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.1.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.1-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chironpy-0.30.1.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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.1.tar.gz
Algorithm Hash digest
SHA256 8cbdfff29d428efd966c5edd7a037977a44b1785eeca510feb4f14bfa7af51ae
MD5 f2054a4d3dcccfd27fcddefd89c7d518
BLAKE2b-256 5a6a2495e81f3e8985d7ac3bc77fad97e7aa2a1585dbf8ffc08a98e756a71f71

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chironpy-0.30.1-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 512541d4686cb54fa0a89897a5d1f4c0e225a86ceb77a7cb22692c58b81a1016
MD5 b6aa175166688056190529c3dddc4c2e
BLAKE2b-256 f33a4c65f36e25d838a977f4fc09f03289ef98dc700d41ad5f2b6829d2aeab63

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