Registry / serialization / garmin-fit-sdk

garmin-fit-sdk

JSON →
library21.208.0pypypi✓ verified 81d ago

A Python library for reading and writing FIT (Flexible and Interoperable Data Transfer) files, widely used in Garmin devices and fitness applications. The SDK provides classes to decode FIT files into messages and fields, and to encode custom FIT files. Current version is 21.202.0, with a release cadence that follows Garmin's FIT SDK releases (usually quarterly).

pip install garmin-fit-sdk
INSTALL
IMPORT
SIG · GARMIN-FIT-SDK
G
garmin-fit-sdk
serializationpythonv21.208.0
Install
1.9s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v21.208.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.9s · import 0.000s · 21MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Decoder
from garmin_fit_sdk import Decoder
from garmin_fit_sdk import Decode
Encoder
from garmin_fit_sdk import Encoder
Profile
from garmin_fit_sdk import Profile

Basic usage: decode a FIT file and iterate over messages. No authentication needed.

from garmin_fit_sdk import Decode, Stream # Decode a FIT file file_path = 'example.fit' stream = Stream.from_file(file_path) decoder = Decode() messages, errors = decoder.read(stream) print(f"Decoded {len(messages)} messages, errors: {errors}") # Print some sample data for msg in messages[:5]: print(msg.name) for field in msg:
Debug
Known issues
breakingThe decode method returns a tuple (messages, errors). In older versions (<21.120.0) it returned just messages. Check that your code unpacks correctly.
fix
Update to newest version and use messages, errors = decoder.read(stream).
affects: <21.120.0
deprecateddatetime.utcfromtimestamp is no longer used; replaced by datetime.fromtimestamp with UTC. This may affect timezone-naive timestamps in older code.
fix
Upgrade to >=21.178.0.
affects: <=21.170.0
gotchaThe Stream object must be created before Decode. Passing a file path directly to Decode will fail.
fix
Always use Stream.from_file() or Stream.from_bytes().
affects: All
gotchaThe Encoder class was added in v21.200.0. Attempting to import Encoder in older versions will raise ImportError.
fix
Check version or update to >=21.200.0 if you need encoding.
affects: <21.200.0
Upgrade
Version history
21.208.0latest on PyPI · released Jun 16, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Resources
garmin-fit-sdk — pip install garmin-fit-sdk · libregistry