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.2.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.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fitparserx-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 1406df214938229584686a250d652e4eeacbd9a36b3d5d25abb2d9a74bd5624d
MD5 6c6b17d688c2ecdf3b1455d73b7d3243
BLAKE2b-256 71542475c6705be7f9a982ebe1fc61dd291545744fc25b30c2b5dc49bf5a2897

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fitparserx-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1e7eb3d0439d5e6d534fbbc8b65e0288b0c8eb562dd9ba7d27bd2735b417fc97
MD5 1d62ed041412fcd837aa02776a55450d
BLAKE2b-256 94a09aa776d70e20153770c10d38168ec5a1a8807ae8c624ed25ce394fba929b

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