Skip to main content

Library for the Withings API

Project description

Python library for the Withings Health API

Build Status Coverage Status

Withings Health API https://developer.withings.com/oauth2/

Uses OAuth 2.0 to authenticate. You need to obtain a client id and consumer secret from Withings by creating an application here: http://developer.withings.com/oauth2/

Installation:

pip install withings_api

Usage:

from withings_api import WithingsAuth, WithingsApi
from settings_api import CLIENT_ID, CONSUMER_SECRET, CALLBACK_URI

auth = WithingsAuth(CLIENT_ID, CONSUMER_SECRET, callback_uri=CALLBACK_URI)
authorize_url = auth.get_authorize_url()
print("Go to %s allow the app and copy the url you are redirected to." % authorize_url)
authorization_response = raw_input('Please enter your full authorization response url: ')
creds = auth.get_credentials(authorization_response)

client = WithingsApi(creds)
measures = client.get_measures(limit=1)
print("Your last measured weight: %skg" % measures[0].weight)

creds = client.get_credentials()

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

withings_api-2.0.0b2.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file withings_api-2.0.0b2.tar.gz.

File metadata

  • Download URL: withings_api-2.0.0b2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.5.6

File hashes

Hashes for withings_api-2.0.0b2.tar.gz
Algorithm Hash digest
SHA256 d8cb0d2066b79633ef8b545442c0a3e2f55323618c10ecc461f2d316f9e5559c
MD5 2cbb0e1a8abd7ed3c0f71356082d9c75
BLAKE2b-256 d397dc719f4dc9a9b549fdb6fd74c080bebb2d8060ce1dcb16e12ca13229e29c

See more details on using hashes here.

Provenance

Supported by

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