Simple parser for Garmin TCX files
Project description
python-tcxparser is a minimal parser for Garmin’s TCX file format. It is not in any way exhaustive. It extracts just enough data to allow me to post data from my Garmin ForeRunner 410 watch to DailyMile’s API.
- Data extracted:
latitude & longitude of start point of workout
type of workout (running, walking, etc)
time of completion of workout (in ISO UTC)
distance of workout (in meters)
duration of workout (in seconds)
calories burned during workout (as estimated by device)
average, max and min heart rate during workout
average pace during workout
average altitude during workout
ascent and descent of workout
max and min altitude
time stamp of each data point (in ISO UTC)
average and max cadence (cycling activities)
Installation
Install it from PyPI:
pip install python-tcxparser
Usage
Basic usage example:
>>> import tcxparser >>> tcx = tcxparser.TCXParser('/home/vinod/Downloads/20121226-212953.tcx') >>> # Duration of workout in seconds ... tcx.duration 1992.78 >>> # latitude/longitude at start of workout ... tcx.latitude 35.951880198 >>> tcx.longitude -79.0931872185 >>> tcx.activity_type 'running' >>> # ISO UTC timestamp when workout completed ... tcx.completed_at '2012-12-26T22:03:05Z' >>> # distance of workout in meters ... tcx.distance 4686.31103516 >>> tcx.distance_units 'meters' >>> # calories burned (as reported by device) ... tcx.calories 379
Compatibility
Python 2.7 or 3.6+
License
BSD
Contact
Please contact me with any questions: Vinod Kurup (vinod@kurup.com)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file python-tcxparser-1.1.0.tar.gz
.
File metadata
- Download URL: python-tcxparser-1.1.0.tar.gz
- Upload date:
- Size: 414.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ffeea80e434ace9da7aa4037aaefc23818477a324e4f986135df6ee584306ed |
|
MD5 | 03025227bdd4795d8ad2a3b82fb87145 |
|
BLAKE2b-256 | 59081e75901eb2b974a864197fe7bf840b0f103e56bc9f29cc8db593c2956ccf |
File details
Details for the file python_tcxparser-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: python_tcxparser-1.1.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b53bd077947ed3f5b16603735dda38edc57da79a55f483803b5755008b57675f |
|
MD5 | 53a27db829bd81916831e335324c5db6 |
|
BLAKE2b-256 | 841ece42b92e403ae20ee81ad2ee0d5c09843aff9235ae6eab12d97da4f2eaec |