Skip to main content

Objective

This is a simple TCX parser / reader which can read Garmin TCX file extension files. The package currently does not support laps and merges the whole exercise into one exercise object. The following data is currently parsed: longitude, latitude, elevation, time, distance, hr_value, cadence, watts, TPX_speed (extension). The following statistics are calculated for each exercise: calories, hr_avg, hr_max, hr_min, avg_speed, start_time, end_time, duration, cadence_avg, cadence_max, ascent, descent, distance, altitude_max, altitude_min, altitude_avg

GitHub requests appreciated. pypi github

Dependencies

This package uses maya for parsing / reading datetimes from TCX files.

Example

An example on how to use the package is shown below.

from tcxreader.tcxreader import TCXReader, TCXTrackPoint

tcx_reader = TCXReader()
file_location = 'example_data/15.tcx'

data: TCXTrackPoint = tcx_reader.read(file_location)
""" Example output:
data = {TCXExercise}
 activity_type = {str} 'Biking'
 ascent = {float} 1404.400026500225
 avg_speed = {float} 24.285282782608693
 cadence_avg = {NoneType} None
 cadence_max = {NoneType} None
 calories = {int} 2010
 descent = {float} 1422.000026166439
 distance = {float} 116366.98
 duration = {float} 17250.0
 end_time = {datetime} 2015-02-19 14:18:59+00:00
 hr_avg = {float} 140.59545804464972
 hr_max = {int} 200
 hr_min = {int} 94
 altitude_max = {float}
 altitude_min = {float}
 altitude_avg = {float}
 max_speed = {float} 18.95800018310547
 start_time = {datetime} 2015-02-19 09:31:29+00:00
 trackpoints = {list: 7799} [TCXTrackPoint]

    {TCXTrackPoint}
	 TPX_speed = {float} 5.011000156402588
	 cadence = {float} 80
	 distance = {float} 514.0499877929688
	 elevation = {float} 46.79999923706055
	 hr_value = {int} 134
	 latitude = {float} 45.5244944896549
	 longitude = {float} 13.596355207264423
	 time = {datetime} 2015-02-19 09:34:17+00:00
	 watts = {float} 123
"""

Features

Allows parsing / reading of TCX files.

Datasets

Datasets are available on the following links: DATASET1 , DATASET2

Licence

This package is distributed under the MIT License. This license can be found online at http://www.opensource.org/licenses/MIT.

Disclaimer

This framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!

Release files for tcxreader 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tcxreader 0.3.2
File Size Uploaded
tcxreader-0.3.2.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tcxreader 0.3.2
File Interpreter ABI Platform
tcxreader-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / tcxreader-0.3.2.tar.gz

Download URL tcxreader-0.3.2.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e0c926ea706b2b74ab6ef9ca7095a8f97be1773cf92b2532d7e454467758078d
BLAKE2b-256 checksum
How to use checksums
9c54bd0930e1ecd99dcbe886f298e46bec88c5e4e7fa95e9626e04a471cf3a23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0

Release files / tcxreader-0.3.2-py3-none-any.whl

Download URL tcxreader-0.3.2-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b56610f3b3a6a837f570e13df82bd49a67c853994db2333ed2324def2cb4203d
BLAKE2b-256 checksum
How to use checksums
06374790bf2f1f47e9307c1a78efd173b5573e351d8be1d24bce2c7edf2c7781
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.9.0

Release history Release notifications | RSS feed

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

1 release file

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.15

2 release files

0.3.13

1 release file

0.3.12

1 release file

0.3.11

1 release file

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

This release

0.3.2 This release

2 release files

0.3.0

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page