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.2.0.tar.gz (98.5 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.2.0-py3-none-any.whl (93.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_fitparse-2.2.0.tar.gz
  • Upload date:
  • Size: 98.5 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.2.0.tar.gz
Algorithm Hash digest
SHA256 4af593e53c2d426d9f7cb342d7bbeb77bce8eb6bb563f97b07d7a7aa9892384f
MD5 22114da5901b4a19c813f1e307c14818
BLAKE2b-256 562fd2a1ff8adae45b9cfa0786c2db6b0c4d99e961822d1f47897b08767668c8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for python_fitparse-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd7aa047316ffbae711c1f90c077f260fbd73cf0588e9a966496d9a7dd4d006d
MD5 f7018a59211ca992dae9095c48482da9
BLAKE2b-256 6769cc9be4ac8d667a29d393104ea596e5c64b48e1bc41ec1a030c5b701ba883

See more details on using hashes here.

Provenance

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