Skip to main content

Python library to parse ANT/Garmin .FIT files

Project description

python-fitparse

NOTE: This is a fork of 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

Install from PyPI:

pip install python-fitparse

Usage

A simple example of printing records from a fit file:

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 file for details.

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

python_fitparse-2.1.6.tar.gz (98.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_fitparse-2.1.6-py3-none-any.whl (93.4 kB view details)

Uploaded Python 3

File details

Details for the file python_fitparse-2.1.6.tar.gz.

File metadata

  • Download URL: python_fitparse-2.1.6.tar.gz
  • Upload date:
  • Size: 98.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for python_fitparse-2.1.6.tar.gz
Algorithm Hash digest
SHA256 538695cb0928ffe33dd802c40d2993d1ef4484fa05a9061eefcdfd47d8fad5b4
MD5 80cb1697f57e1b1a335f6279d44349be
BLAKE2b-256 46194f7bf3ce827a7d38ca3e96b196dde6c0b499ada6de14991a2f94bfa03b8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_fitparse-2.1.6.tar.gz:

Publisher: main.yml on nbr23/python-fitparse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_fitparse-2.1.6-py3-none-any.whl.

File metadata

  • Download URL: python_fitparse-2.1.6-py3-none-any.whl
  • Upload date:
  • Size: 93.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for python_fitparse-2.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2bfe290f677b4381e61d5f3e3dcc3f6f0efef371a5ad27d31827af3dfe08b123
MD5 6eb19467442c9b2f809dceebd50ec03a
BLAKE2b-256 fb72079bb49c4ac3514658f41a12976c685a11f37ae6ffb49e5436141eaa0814

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_fitparse-2.1.6-py3-none-any.whl:

Publisher: main.yml on nbr23/python-fitparse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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