Skip to main content

Workout analysis

Project description

chironpy

PyPI PyPI - Python Version PyPI - Downloads Tests Documentation

chironpy

chironpy is a Python library for analysing endurance sports data. Load workouts from .fit, .gpx, .tcx, or the Strava API and analyse them with a familiar pandas-based interface — compute best intervals, elevation gain, speed, power, and more.

Installation

# with uv (recommended)
uv add chironpy

# with pip
pip install chironpy

Quickstart

from chironpy import WorkoutData

# Load a workout file
data = WorkoutData.from_file("my_workout.fit")

# Best efforts — time-based and distance-based
data.best_intervals([60, 300, 1200], stream="power")
data.fastest_distance_intervals([1000, 5000, 10000])

# Elevation gain
data.elevation_gain()

# Resample to 10-second buckets
data.resample("10s")

Key features

  • Multi-format loading.fit, .gpx, .tcx, and Strava activity streams
  • pandas-nativeWorkoutData subclasses pd.DataFrame; use any pandas method directly
  • Standardised columnsspeed, power, heartrate, cadence, elevation, distance, latitude, longitude regardless of source format
  • Best intervals — time-based and distance-based personal bests
  • Elevation analysis — gain, smoothed elevation, grade
  • Resampling — downsample to any frequency with semantically correct per-column aggregations

Documentation

Full documentation at chironpy.chironapp.com

Contributing

See CONTRIBUTING.md.

Attribution

chironpy is a maintained fork of sweatpy by Maksym Sladkov and Aart Goossens. The original project focused on cycling analysis; chironpy extends it with an emphasis on long-distance running.

With thanks to Aaron Schroeder for work on running power and elevation metrics in heartandsole and spatialfriend.

License

MIT

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

chironpy-0.30.0.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chironpy-0.30.0-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file chironpy-0.30.0.tar.gz.

File metadata

  • Download URL: chironpy-0.30.0.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for chironpy-0.30.0.tar.gz
Algorithm Hash digest
SHA256 0aef4c34a1317e2647cf83f046f57440eb9d3f9d85e27023eb007ea99d37d5b6
MD5 a6463ff2deedc80867ce3aaa54990e86
BLAKE2b-256 2218ee66f039b2256535ccaef474c845dbbcd81300b6ed75e2cbac1edc3744c8

See more details on using hashes here.

File details

Details for the file chironpy-0.30.0-py3-none-any.whl.

File metadata

  • Download URL: chironpy-0.30.0-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for chironpy-0.30.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8c9f47ccff0602351872fa1a26e204f982503f08067b655ad6001c4e9fb3cd0
MD5 f79a159e786ab8fd29b0fad608cb94d5
BLAKE2b-256 93990344c27fb149a7a2f777b9f36b98fb3dc6595cacdb5cccf290617085525e

See more details on using hashes here.

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