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

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_fitparse-2.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 a6d1b31d2cbe8599d083fc693863914f5afd757f8ef6d4291c489fea025bcb9c
MD5 7b1084838cbc5d11526a4a808cc77d68
BLAKE2b-256 2cc2dfbc03484bf4f788bcabd70435b6c4755024e626c8e6f2cdbe70790f5266

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_fitparse-2.1.7.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.7-py3-none-any.whl.

File metadata

  • Download URL: python_fitparse-2.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 23e26353e1c00ad058816c8c4d51df70a6b70b8f5f9bbc016a21a422503b010d
MD5 c0b272c1f940bfb8093cebea2e5faa04
BLAKE2b-256 1a21003d28020a391dd8bd2dad853f2376fd7d7e619e64980e71f9dcffd116f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_fitparse-2.1.7-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