simonepri / fitbit2garmin

⬇ Downloads lifetime Fitbit data and exports it into the format supported by Garmin Connect data importer. This includes historical body composition data (weight, BMI, and fat percentage), activity data (calories burned, steps, distance, active minutes, and floors climbed), and individual GPS exercises (TCX).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fitbit2garmin

Lint status
Code style Linter Formatter Types checker Build tool
Project license

⬇ Downloads lifetime Fitbit data and exports it into the format supported by Garmin Connect data importer.

Synopsis

This package provides a simple python CLI that allows people to download all their Fitbit data into a format that is supported by Garmin Connect.

This includes:

  • historical body composition data (weight, BMI, and fat percentage);
  • activity data (calories burned, steps, distance, active minutes, and floors climbed);
  • individual GPS exercises (TCX).

Do you believe that this is useful? Has it saved you time? Or maybe you simply like it?
If so, support this work with a Star ⭐️.

Privacy

The CLI runs on your computer and your data is only visible and accessible by you. The CLI does not share nor send your data to third parties.

Usage

  1. Install the fitbit2garmin CLI using the following terminal command:
python -m pip install "fitbit2garmin@git+https://github.com/simonepri/fitbit2garmin"
  1. Launch the following terminal command from a folder where you want the data to be downloaded replacing YYYY-MM with year and month of when you want the exported data to start from:
fitbit2garmin dump-all -s YYYY-MM-01

Tip: The process will take several hours or even days depending on how many years of data you have. You can speed-up the process by adjusting the start/end date used by the script using the -s YYYY-MM-DD and -e YYYY-MM-DD flags.

Tip: You can stop and resume the download at any time by just killing and re-running the above command. The CLI will continue automatically from where it left.

  1. From Garmin Connect, log into your account then select the import icon in the top right corner of the page (cloud with upward arrow icon).

  2. Select Import Data.

  3. Select Browse.

  4. Locate and select the files exported by the CLI.

Tip: I strongly recommend to upload up to 1 year of data at a time.

  1. Select Import Data.

  2. Select the units of measure that match what you used with Fitbit.

Tip: If you mistakenly import a file using the wrong units of meaures, simply re-import it again. The Garmin Connect importer will replace old imported values automatically.

  1. Select Continue.

Tip: If the import for some file fails, try to refresh the page and re-import then again. The Garmin Importer is smart enough and you won't end-up with duplicated data if you import the same file twice.

  1. Uninstall the fitbit2garmin CLI using the following terminal command:
python -m pip uninstall fitbit2garmin

Disclaimer

This product is not sold or affiliated in any way with Fitbit or Garmin, and they do not service or warrant the functionality of this product.

Development

You can install this library locally for development using the commands below. If you don't have it already, you need to install poetry first.

# Clone the repo
git clone https://github.com/simonepri/fitbit2garmin
# CD into the created folder
cd fitbit2garmin
# Create a virtualenv and install the required dependencies using poetry
poetry install

You can then run commands inside the virtualenv by using poetry run COMMAND.
Alternatively, you can open a shell inside the virtualenv using poetry shell.

If you wish to contribute to this project, run the following commands locally before opening a PR and check that no error is reported (warnings are fine).

# Run the code formatter
poetry run task format
# Run the linter
poetry run task lint
# Run the static type checker
poetry run task types

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the license file for details.

About

⬇ Downloads lifetime Fitbit data and exports it into the format supported by Garmin Connect data importer. This includes historical body composition data (weight, BMI, and fat percentage), activity data (calories burned, steps, distance, active minutes, and floors climbed), and individual GPS exercises (TCX).

License:MIT License


Languages

Language:Python 100.0%