Skip to content

jflasher/FitBit.py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A python library for the FitBit API forked from https://github.com/jplattel/FitBit.py

So far, the only change from the original project is the move to the python-oauth2 module.


Didn't see one that fitted my needs so I build my own.

Usage

Edit the fitbit.py file with your consumer key and secret.

import fitbit
z = fitbit.FitBit()

Make a request token:

auth_url, auth_token = z.GetRequestToken()

Visit the auth_url and copy the PIN. Use the PIN to get an access token:

access_token = z.GetAccessToken(PIN, auth_token)

Store the access_token for later usage. You can now call the API with it:

response = z.ApiCall(access_token, apiCall='/1/user/-/activities/log/steps/date/today/7d.json')

All responses for the functions are received in JSON but are also available in XML.

About

FitBit Python Library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%