Here's a Python library to parse ANT/Garmin
pip install fitparse
- FIT files contain data stored in a binary file format.
- The FIT (Flexible and Interoperable Data Transfer) file protocol is specified by ANT.
- The SDK, code examples, and detailed documentation can be found in the ANT FIT SDK.
Major Changes From Original Version
After a few years of laying dormant we are back to active development!
The old version is archived as
New, hopefully cleaner public API with a clear division between accessible and internal parts. (Still unstable and partially complete.)
Proper documentation! Available here.
Unit tests and example programs.
(WIP) Command line tools (eg a
Component fields and compressed timestamp headers now supported and not just an afterthought. Closes issues #6 and #7.
FIT file parsing is generic enough to support all types. Going to have specific
FitFilesubclasses for more popular file types like activities.
(WIP) Converting field types to normalized values (for example,
date_time, etc) done in a consistent way, that's easy to customize by subclassing the converter class. I'm going to use something like the Django form-style
convert_<field name>idiom on this class.
The FIT profile is its own complete python module, rather than using
- Bonus! The profile generation script is less ugly (but still an atrocity) and supports every ANT FIT SDK from version 1.00 up to 5.10.
setup.pymodule. Closes issue #2, finally! I'll upload the package to PyPI when it's done.
Support for parsing one record at a time. This can be done using
<FitFile>.parse_one()for now, but I'm not sure of the exact implementation yet.
Updating to new FIT SDK versions
- Download the latest ANT FIT SDK.
- Update the profile:
python3 scripts/generate_profile.py /path/to/fit_sdk.zip fitparse/profile.py
This project is licensed under the MIT License - see the
file for details.