Skip to main content

Parse Garmin .fit wellness data, process it, and make DataFrame and NumPy arrays

Project description

fitparserx library

A lightweight Python library for parsing Garmin .fit files and extracting wellness data (heart rate, stress level, respiration rate) into convenient Python structures (pandas DataFrame, NumPy array). These data are sourced from Garmin Wellness exports: either the daily export (Account Settings > Account Information > Export Wellness Data) or the full archive emailed via the Data Management page. Support for Garmin activity data will be added in a future release.

Features

Uses Garmin .fit files decoded with the garmin_fit_sdk to:

  • Extract proper datetimes and heart rate data.
  • Optionally include respiration rate and stress level data.
  • Converts the raw data into a pandas DataFrame or a NumPy array.
  • Timezone‑aware datetime handling.

Installation

  1. (Optional) Create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
  1. Install the package using pip:
pip install fitparserx

Usage

from fitparserx import FitParser

Initialize parser pointing to a directory or single file

Put your data into a data/ file. Otherwise, the parser goes through data in the current working directory. You can also point a path to a specific file.

mode='all' requires email prefix for .fit filenames

parser = FitParser(path="./data", email="user@example.com", mode="all")

DataFrame

Convert to a pandas DataFrame with datetimes and metrics:

# Only heart rate (default)
fit_df = parser.to_dataframe()

# Include stress level and respiration rate, fill missing with NaN
fit_df = parser.to_dataframe(add_metrics=["stress_level", "respiration_rate"], timezone="UTC")

NumPy Array

fit_np = parser.to_numpy()

License

MIT License

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

fitparserx-0.1.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

fitparserx-0.1.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file fitparserx-0.1.1.tar.gz.

File metadata

  • Download URL: fitparserx-0.1.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for fitparserx-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4fa6c96c58ccec48aa3cdc343f8edb515079a249f30df94175f56e1d0fef8a77
MD5 59a59dfcf1aedcfb6e93b0be4f70e2fd
BLAKE2b-256 37d2e0e254fd8e1534c0db0385755a9ceadc0249d9d88517564fdf415a669684

See more details on using hashes here.

File details

Details for the file fitparserx-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fitparserx-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for fitparserx-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c7ef3873811a26f54c6d4bc706e1a535b89c902b0e4d5b37166ba8aa3cc3caa9
MD5 b9442ba0e6678e13791819b13a56383c
BLAKE2b-256 d5a7bf728cbd892b5d6ae7406d3e083bbf7fc2c921604b59eea4e738dfe192cd

See more details on using hashes here.

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