Library for the Withings API
Project description
# Python library for the Withings API
[![Build Status](https://travis-ci.org/orcasgit/python-withings.svg?branch=master)](https://travis-ci.org/orcasgit/python-withings) [![Coverage Status](https://coveralls.io/repos/orcasgit/python-withings/badge.png?branch=master)](https://coveralls.io/r/orcasgit/python-withings?branch=master) [![Requirements Status](https://requires.io/github/orcasgit/python-withings/requirements.svg?branch=requires-io-master)](https://requires.io/github/orcasgit/python-withings/requirements/?branch=requires-io-master)
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>
This is a maintained fork of the `python-withings` library, the origin version
is [here](https://github.com/maximebf/python-withings).
Installation:
pip install pywithings
Usage:
``` python
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
```
[![Build Status](https://travis-ci.org/orcasgit/python-withings.svg?branch=master)](https://travis-ci.org/orcasgit/python-withings) [![Coverage Status](https://coveralls.io/repos/orcasgit/python-withings/badge.png?branch=master)](https://coveralls.io/r/orcasgit/python-withings?branch=master) [![Requirements Status](https://requires.io/github/orcasgit/python-withings/requirements.svg?branch=requires-io-master)](https://requires.io/github/orcasgit/python-withings/requirements/?branch=requires-io-master)
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>
This is a maintained fork of the `python-withings` library, the origin version
is [here](https://github.com/maximebf/python-withings).
Installation:
pip install pywithings
Usage:
``` python
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
```
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
pywithings-0.4.0.tar.gz
(5.6 kB
view details)
File details
Details for the file pywithings-0.4.0.tar.gz
.
File metadata
- Download URL: pywithings-0.4.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c50c8b786646a40703409bf61e78a223102e436eac742b2bffa5fbed3fe977d8 |
|
MD5 | d5b1de4540378f64b0b5396c583f616f |
|
BLAKE2b-256 | 860c3cfabb5c5db51825d8cefe388d35c187733c2120105e73666707f1dd9337 |