Metadata-Version: 2.4
Name: python-fitparse
Version: 2.1.6
Summary: Python library to parse ANT/Garmin .FIT files
Project-URL: Homepage, https://github.com/nbr23/python-fitparse
Project-URL: Repository, https://github.com/nbr23/python-fitparse
Project-URL: Issues, https://github.com/nbr23/python-fitparse/issues
Author-email: David Cooper <dave@kupesoft.com>, nbr23 <max@23.tf>
License: MIT License
        
        Copyright (c) 2011-2025, David Cooper <david@dtcooper.com>
        Copyright (c) 2017-2025, Carey Metcalfe <carey@cmetcalfe.ca>
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: ant,files,fit,garmin,parse
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Provides-Extra: generate
Requires-Dist: openpyxl==3.1.5; extra == 'generate'
Requires-Dist: requests; extra == 'generate'
Description-Content-Type: text/markdown

python-fitparse
===============

> **NOTE:** This is a fork of [dtcooper/python-fitparse](https://github.com/dtcooper/python-fitparse).
> The original maintainer has limited time to work on this package.
> This fork continues active development with support for new FIT SDK versions and patches.

Here's a Python library to parse ANT/Garmin `.FIT` files.
[![Build Status](https://github.com/nbr23/python-fitparse/workflows/test/badge.svg)](https://github.com/nbr23/python-fitparse/actions?query=workflow%3Atest)


Install from [![PyPI](https://img.shields.io/pypi/v/python-fitparse.svg)](https://pypi.python.org/pypi/python-fitparse/):
```
pip install python-fitparse
```

Usage
-----
A simple example of printing records from a fit file:

```python
import fitparse

# Load the FIT file
fitfile = fitparse.FitFile("my_activity.fit")

# Iterate over all messages of type "record"
# (other types include "device_info", "file_creator", "event", etc)
for record in fitfile.get_messages("record"):

    # Records can contain multiple pieces of data (ex: timestamp, latitude, longitude, etc)
    for data in record:

        # Print the name and value of the data (and the units if it has any)
        if data.units:
            print(" * {}: {} ({})".format(data.name, data.value, data.units))
        else:
            print(" * {}: {}".format(data.name, data.value))

    print("---")
```

The library also provides a `fitdump` command-line tool for parsing FIT files. Run `fitdump --help` for details.

License
-------

This project is licensed under the MIT License - see the [`LICENSE`](LICENSE)
file for details.
