Skip to main content

A Django app to access Fitbit Web APIs.

Project description

django-fitbit-healthkit

⚠️ DEPRECATED — Fitbit Web API is being shut down

Google is retiring the Fitbit Web API in September 2026. After that date this package will no longer function and will be archived.

What that means for users of this package:

  • Through the Fitbit Web API sunset (~September 2026), this project will receive security updates only — no new features.
  • After the API is shut down, the GitHub repository will be archived and the PyPI release will be left in place but marked deprecated.
  • If you are starting a new integration, do not adopt this package — pick a data source that will still exist after September 2026.

If you depend on Fitbit data going forward, plan a migration off the Fitbit Web API now.

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.3.tar.gz (11.2 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.3-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for django_fitbit_healthkit-0.6.3.tar.gz
Algorithm Hash digest
SHA256 15b3fa7ae30641e918bff9540079f715276c9c1445bce01b10fbc11cadb1c6c3
MD5 72575c808ae0c74adb8c0ee47f371417
BLAKE2b-256 6f53f2fa2844a6a3e40b8a51ad0eae3bc03c23fb996d659de4f0e54ba299aeaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_fitbit_healthkit-0.6.3.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.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_fitbit_healthkit-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 68bcfd51fc03c84dc133edecd3fc0369e66a94795f5fc3d73ea777ca842a34fa
MD5 8afe3262e9800790b78e346d0798a86f
BLAKE2b-256 3240251b990396661242a4f478ebf4f5d48e82bf9d3aac543b40be9d70bf7569

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_fitbit_healthkit-0.6.3-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