Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An implementation of the Fitbit API for Django projects.
Python Shell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
django_phitbit
docs
tests
.gitignore
.travis.yml Updates for django specific package.
AUTHORS.rst
CONTRIBUTING.rst
HISTORY.rst
LICENSE
MANIFEST.in
README.rst
requirements-test.txt
requirements.txt
runtests.py
setup.py Tidy ups - removed uneeded packages, corrected versions.
tox.ini

README.rst

Django-phitbit

https://badge.fury.io/py/django-phitbit.png https://travis-ci.org/phalt/django-phitbit.png?branch=master https://pypip.in/d/django-phitbit/badge.png

An alternative integration of the Fitbit API for Django, with a whole bunch of extra features.

Features

  • Fitbit Authentication Views.
  • Store consumer keys in the database.
  • Full Fitbit API access through the Django user model:
>>> usr = User.objects.get(pk=1)
>>> act = usr.phitbit.api.activities()
>>> act['goals']
{u'activeMinutes': 60, u'distance': 6.44, u'caloriesOut': 2000, u'steps': 10000}
  • Wrappers around the Fitbit API for even quicker access to common resources:
>>> usr.phitbit.goals()
{u'activeMinutes': 60, u'distance': 6.44, u'caloriesOut': 2000, u'steps': 10000}
# So much faster than the code above.
  • Store and retrieve collected resources in your Django app:
>>> goal_data = usr.phitbit.goals()
>>> usr.phitbit.store('goals', goal_data)

>>> usr.phitbit.retrieve('goals')
{'data': {u'activeMinutes': 60, u'distance': 6.44, u'caloriesOut': 2000, u'steps': 10000},
 'modified_date': datetime.datetime(2013, 10, 17, 12, 21, 25, 457581)}

TODO

  • Public facing API for stored Phitbit data.
  • Python 3.* compatibility
Something went wrong with that request. Please try again.