Skip to main content

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-native — WorkoutData subclasses pd.DataFrame; use any pandas method directly
  • Standardised columns — speed, 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

Release files for chironpy 0.30.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 chironpy 0.30.2
File Size Uploaded
chironpy-0.30.2.tar.gz 3.5 MB Details

Built distribution (wheel)

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

Total release size: 5.4 MB

Release files / chironpy-0.30.2.tar.gz

Download URL chironpy-0.30.2.tar.gz
Size 3.5 MB
Tags Source
SHA-256 checksum
How to use checksums
4932dcf5776cedb0ddff4b9ad9b070c8e6dcca546cc0c5dfa2febb97a897c57a
BLAKE2b-256 checksum
How to use checksums
30d0798eae5f77e08e67cfe7a4f6d19ff612e59d8d0476305a9321b6661df698
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","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}

Release files / chironpy-0.30.2-py3-none-any.whl

Download URL chironpy-0.30.2-py3-none-any.whl
Size 2.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
67961070f10191c321d2c956812bf087eb154e795fe83e18f4646c2dd2230614
BLAKE2b-256 checksum
How to use checksums
5e16ed5ca8f08db09d5afaf40e21c2ac0f4e556a2cd36e247364ca6cfcc025ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","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}

Release history Release notifications | RSS feed

This release

0.30.2 This release

2 release files

0.30.1

2 release files

0.29.1

2 release files

0.28.1

2 release files

0.28.0

2 release files

0.27.0

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