Skip to content

axsapronov/python-withings

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python library for the Withings API

Build Status Coverage Status Requirements Status

Withings Body metrics Services API http://oauth.withings.com/api/doc

Uses Oauth 1.0 to authentify. You need to obtain a consumer key and consumer secret from Withings by creating an application here: https://oauth.withings.com/partner/add

Installation:

pip install https://github.com/orcasgit/python-withings/archive/master.zip#egg=withings-0.4.0

Usage:

from withings import WithingsAuth, WithingsApi
from settings import CONSUMER_KEY, CONSUMER_SECRET

auth = WithingsAuth(CONSUMER_KEY, CONSUMER_SECRET)
authorize_url = auth.get_authorize_url()
print "Go to %s allow the app and copy your oauth_verifier" % authorize_url

oauth_verifier = raw_input('Please enter your oauth_verifier: ')
creds = auth.get_credentials(oauth_verifier)

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

About

Library for the Withings API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%