python-fitparse
Python library to parse ANT/Garmin .FIT files
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.0%) to scientific vocabulary
Keywords
Repository
Python library to parse ANT/Garmin .FIT files
Basic Info
- Host: GitHub
- Owner: dtcooper
- License: mit
- Language: Python
- Default Branch: master
- Homepage: http://pythonhosted.org/fitparse/
- Size: 4.36 MB
Statistics
- Stars: 781
- Watchers: 63
- Forks: 186
- Open Issues: 35
- Releases: 0
Topics
Metadata Files
README.md
python-fitparse
:warning: NOTE: I have *limited to no time** to work on this package these days!*
I am looking for a maintainer to help with issues and updating/releasing the package. Please reach out via email at david@dtcooper.com if you have interest in helping.
If you're having trouble using this package for whatever reason, might we suggest using an alternative library: fitdecode by polyvertex.
Cheers,
David
Here's a Python library to parse ANT/Garmin .FIT files.
Install from :
pip install fitparse
FIT files
- 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.
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 "deviceinfo", "filecreator", "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 script for command line usage:
```
$ fitdump --help
usage: fitdump [-h] [-v] [-o OUTPUT] [-t {readable,json}] [-n NAME] [--ignore-crc] FITFILE
Dump .FIT files to various formats
positional arguments: FITFILE Input .FIT file (Use - for stdin)
optional arguments: -h, --help show this help message and exit -v, --verbose -o OUTPUT, --output OUTPUT File to output data into (defaults to stdout) -t {readable,json}, --type {readable,json} File type to output. (DEFAULT: readable) -n NAME, --name NAME Message name (or number) to filter --ignore-crc Some devices can write invalid crc's, ignore these. ```
See the documentation for more: http://dtcooper.github.io/python-fitparse
Major Changes From Original Version
After a few years of laying dormant we are back to active development!
The old version is archived as
v1-archive.
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
.FITto.CSVconverter).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,
bool,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-styleconvert_<field name>idiom on this class.The FIT profile is its own complete python module, rather than using
profile.def.- 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.
A working
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
License
This project is licensed under the MIT License - see the LICENSE
file for details.
Owner
- Name: David Cooper
- Login: dtcooper
- Kind: user
- Location: New York, NY
- Company: Global (Corus Entertainment)
- Website: https://jew.pizza/
- Twitter: dtcooper
- Repositories: 31
- Profile: https://github.com/dtcooper
Do I contradict myself? Very well then I contradict myself, (I am large, I contain multitudes.)
GitHub Events
Total
- Issues event: 1
- Watch event: 43
- Issue comment event: 5
- Push event: 2
- Pull request review event: 1
- Pull request event: 4
- Fork event: 6
Last Year
- Issues event: 1
- Watch event: 43
- Issue comment event: 5
- Push event: 2
- Pull request review event: 1
- Pull request event: 4
- Fork event: 6
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Carey Metcalfe | c****y@c****a | 36 |
| David Cooper | d****e@k****m | 33 |
| David Cooper | d****c@e****m | 9 |
| Florian Klink | f****i@f****e | 6 |
| Jean-Charles Lefebvre | p****x@g****m | 6 |
| Ondra Medek | x****o@g****m | 6 |
| Liam Murphy | l****m@g****m | 5 |
| Victor Kropp | v****p@g****m | 5 |
| Daniel Lenski | d****i@g****m | 5 |
| Tom Fryers | t****s@g****m | 4 |
| Aart Goossens | a****t@g****e | 3 |
| Jon Nall | n****l@s****g | 2 |
| beyoung | t****g@g****m | 2 |
| Arnold Krille | a****d@a****e | 1 |
| Daniel Abad | a****s@g****m | 1 |
| Fabian Gebhart | f****t@g****m | 1 |
| Jochen Peters | d****v@e****t | 1 |
| Mathias B | m****r@g****m | 1 |
| Michael Traver | m****r@g****m | 1 |
| Patrick Dura | p****k@g****m | 1 |
| Scott Phillips | 5****h | 1 |
| roboes | r****o@o****m | 1 |
| Bill Booth | c****5@g****m | 1 |
| twain young | t****g@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 59
- Total pull requests: 48
- Average time to close issues: 5 months
- Average time to close pull requests: 4 months
- Total issue authors: 45
- Total pull request authors: 22
- Average comments per issue: 2.42
- Average comments per pull request: 1.88
- Merged pull requests: 26
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 4
- Average time to close issues: N/A
- Average time to close pull requests: 1 day
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.5
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- xmedeko (5)
- woodmicha (5)
- AartGoossens (3)
- beyoung (2)
- jmrnilsson (2)
- buma (2)
- sanderroosendaal (2)
- sho-87 (1)
- ashrude (1)
- anthonyjchriste (1)
- hugokernel (1)
- MeisterP (1)
- jdwil (1)
- rgmf (1)
- mattschultheis (1)
Pull Request Authors
- xmedeko (7)
- dlenski (6)
- roboes (4)
- pR0Ps (4)
- fundthmcalculus (4)
- beyoung (3)
- AartGoossens (3)
- anthonyjchriste (2)
- liamjm (2)
- emirpnet (1)
- fgebhart (1)
- christcl (1)
- mt5555 (1)
- scott-phillips-ah (1)
- cwbooth5 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 15
-
Total downloads:
- pypi 13,021 last-month
-
Total dependent packages: 13
(may contain duplicates) -
Total dependent repositories: 70
(may contain duplicates) - Total versions: 25
- Total maintainers: 3
pypi.org: fitparse
Python library to parse ANT/Garmin .FIT files
- Homepage: https://www.github.com/dtcooper/python-fitparse
- Documentation: https://fitparse.readthedocs.io/
- License: MIT License Copyright (c) 2011-2020, David Cooper <david@dtcooper.com> Copyright (c) 2017-2020, 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.
-
Latest release: 1.2.0
published over 5 years ago
Rankings
alpine-v3.18: py3-fitparse
Python library to parse ANT/Garmin .FIT files
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r2
published almost 3 years ago
Rankings
Maintainers (1)
alpine-v3.18: py3-fitparse-pyc
Precompiled Python bytecode for py3-fitparse
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r2
published almost 3 years ago
Rankings
Maintainers (1)
alpine-edge: py3-fitparse-pyc
Precompiled Python bytecode for py3-fitparse
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r4
published almost 2 years ago
Rankings
Maintainers (1)
alpine-edge: py3-fitparse
Python library to parse ANT/Garmin .FIT files
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r4
published almost 2 years ago
Rankings
Maintainers (1)
alpine-v3.17: py3-fitparse
Python library to parse ANT/Garmin .FIT files
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r0
published over 3 years ago
Rankings
Maintainers (1)
conda-forge.org: python-fitparse
Python library to parse ANT/Garmin .FIT files
- Homepage: http://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.1.0
published almost 7 years ago
Rankings
alpine-v3.19: py3-fitparse
Python library to parse ANT/Garmin .FIT files
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r3
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.22: py3-fitparse
Python library to parse ANT/Garmin .FIT files
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r4
published almost 2 years ago
Rankings
Maintainers (1)
alpine-v3.20: py3-fitparse-pyc
Precompiled Python bytecode for py3-fitparse
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r4
published almost 2 years ago
Rankings
Maintainers (1)
alpine-v3.21: py3-fitparse-pyc
Precompiled Python bytecode for py3-fitparse
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r4
published almost 2 years ago
Rankings
Maintainers (1)
alpine-v3.21: py3-fitparse
Python library to parse ANT/Garmin .FIT files
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r4
published almost 2 years ago
Rankings
Maintainers (1)
alpine-v3.22: py3-fitparse-pyc
Precompiled Python bytecode for py3-fitparse
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r4
published almost 2 years ago
Rankings
Maintainers (1)
alpine-v3.19: py3-fitparse-pyc
Precompiled Python bytecode for py3-fitparse
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r3
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.20: py3-fitparse
Python library to parse ANT/Garmin .FIT files
- Homepage: https://github.com/dtcooper/python-fitparse
- License: MIT
-
Latest release: 1.2.0-r4
published almost 2 years ago
Rankings
Maintainers (1)
Dependencies
- coverage * test
- pip-tools * test
- coverage >=4.5.2 test
- coveralls >=1.7.0 test
- actions/checkout v2 composite
- actions/setup-python v2 composite