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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fitparserx-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 8accc4fdf36eb2fc79352091903e6720d8eef792cfdab6127edbb9d1aec75ec1
MD5 7666179a3ee540dc0c284d33c2510300
BLAKE2b-256 f3f2be73cabb92b21bec6e7702b935824aab5fff9272f474585df0cea0f393ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fitparserx-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d506536ebd66d4641cb7e87472bd04534badd53fc57e8334908f619e20c86cc8
MD5 198b333d2dc04bcb53b4ae1e033947b4
BLAKE2b-256 01736cfb0b5777d14bcad558b96c6d76f03c7552f1bc068ff31266bbcb8e7098

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