description: Recovery-grade FIT file processing for Python: parse corrupted .fit files, repair crash files for upload, analyze workouts. Zero dependencies, deterministic, MIT.¶
Parse anything.
Lose nothing silently.¶
chiptime is recovery-grade FIT file processing: hand it any workout file — pristine or mangled — and it returns everything genuinely in there, explains every decision it made, and never invents what isn't.
Every sports watch and bike computer saves workouts as .fit files — and in the real world those files are often imperfect: devices crash mid-ride, batteries die during the save, firmware writes impossible timestamps, sensors drop out. Most parsers handle the happy path and fail the rest: they crash, silently skip data, or quietly make things up. chiptime is built for the rest.
import chiptime
result = chiptime.parse("inProgressActivity.fit") # truncated mid-ride crash file
result.ok # True — salvaged
result.recovery.recovered_records # what came back
result.activity.sessions[0].rebuilt # True: session rebuilt from records
result.to_canonical_json() # deterministic, byte-stable JSON
Why chiptime¶
-
Never loses data silently
Every drop, repair, and reinterpretation is recorded in a machine-readable
provenancelog on the output. Silent data loss is treated as the cardinal sin. -
Deterministic to the byte
Same input bytes → byte-identical canonical JSON, across runs, machines, and operating systems. Safe to diff, cache, and test against.
-
Repairs, not just reads
chiptime repairsalvages a damaged file and writes a fresh, valid.fitthat Garmin Connect and Strava accept — verified against their validators. -
Sport-aware analytics
chiptime analyzespeaks each sport's language: min/km for runs, watts for rides, min/100m and sets for swims, /500m splits for rowing — computed only from real evidence, never estimated. -
Built for agents
Stable machine codes for every error and insight, meaningful exit codes, canonical JSON, and generated reference docs. AI agents are first-class users.
-
Honest by contract
nullmeans the sensor said nothing;0means it said zero. Unknown fields are preserved, not crashed on. If data is truly gone, chiptime says so.
Install¶
Python ≥ 3.11, zero runtime dependencies. pip install "chiptime[pandas]" adds DataFrame export.
Sixty seconds of chiptime¶
chiptime parse ride.fit # human summary
chiptime parse ride.fit --json # canonical JSON for machines
chiptime repair crashed.fit -o fixed.fit
chiptime validate fixed.fit --platform garmin-connect
chiptime analyze ride.fit --ftp 250 # per-sport report + insights
Continue with Getting started, or jump straight to the Python API reference.