Skip to main content

A Django app to access Fitbit Web APIs.

Project description

django-fitbit-healthkit

django-fitbit-healthkit is a Django Fitbit App with HealthKit-friendly API. The goal is to provide a wrapper over fitbit authentication, token management, and web APIs that is similar to other high-level healthkit wrappers like react-native-healthkit. The HealthKit API from Apple is here for reference.

A sample app is included in the sample directory to showcase how to use the fitbit app.

Detailed documentation is in the "docs" directory.

Quick start

  1. Add "fitbit" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
    ...,
    "django_fitbit_healthkit",
]
  1. Include the fitbit URLconf in your project urls.py like this:
path("fitbit/", include("django_fitbit_healthkit.urls")),
  1. Run python manage.py migrate to create the models.

  2. Visit the /fitbit/login URL to sign in with Fitbit.

Running the sample app

Make sure to set environment variables for

FITBIT_CLIENT_ID=xxx
FITBIT_CLIENT_SECRET=xxx

which will be picked up by sample/settings.py. In your fitbit app settings, add http://localhost:8000/fitbit/success to the allowed callback URLs.

Set up dev environment. There is nothing complicated here, so vanilla venv on any platform is probably sufficient (no nix/devbox, dev container type setup is necessary).

python3 -m venv venv
source venv/bin/activate
pip3 install Django

Apply DB migrations with python3 manage.py migrate. You can run the app quite simply:

python3 manage.py runserver

This will allow you to register an account, sign in with fitbit, and view some of your data.

Release workflow

Develop on a branch. When it's ready, merge to main.

If this is not a release (no bumped version in setup.cfg), then TestPyPI may fail with a duplicate sdist upload (it has before).

If it's a new version, then the setup.cfg should have been bumped on the branch. When it's merged, we expect TestPyPI to succeed. Then the tag can be pushed to GH, which will trigger real PyPI release.

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

django_fitbit_healthkit-0.6.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_fitbit_healthkit-0.6.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file django_fitbit_healthkit-0.6.1.tar.gz.

File metadata

  • Download URL: django_fitbit_healthkit-0.6.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_fitbit_healthkit-0.6.1.tar.gz
Algorithm Hash digest
SHA256 572f1ca38c5f6a5c87c924a883be561244df71cdd24282eb5896c08d58188cbe
MD5 6923146490eddfaa276d6ed5c3b8e941
BLAKE2b-256 5ac32ce69c54aa74861d0f5372a06fae99e6ef3de2a7c1442a29fb1a08279874

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_fitbit_healthkit-0.6.1.tar.gz:

Publisher: ci.yml on andyreagan/django-fitbit-healthkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_fitbit_healthkit-0.6.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_fitbit_healthkit-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8aa8e5addd85ff65a283a89af94b9c0130a713e5e16360f46bcaf505a13d003c
MD5 99ee6faa0018acda472dbf7c1450cd44
BLAKE2b-256 f3468f326f38825515bf61272ee64de717b32d36b94c05382042299523aee74d

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_fitbit_healthkit-0.6.1-py3-none-any.whl:

Publisher: ci.yml on andyreagan/django-fitbit-healthkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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