Skip to main content

AmakaFlow FIT File Tool

Single source of truth for Garmin FIT file generation and exercise mapping.

Installation

# From the amakaflow-dev-workspace directory
pip install -e ./amakaflow-fitfiletool

# Or from git (when published)
pip install git+https://github.com/yourorg/amakaflow-fitfiletool.git

Usage

Exercise Lookup

from amakaflow_fitfiletool import GarminExerciseLookup

lookup = GarminExerciseLookup()
result = lookup.find("DB Bench Press")
# Returns: {"category_id": 0, "category_name": "Bench Press", "display_name": "Bench Press", ...}

Build FIT File

from amakaflow_fitfiletool import build_fit_workout

workout = {
    "title": "My Workout",
    "blocks": [{
        "exercises": [
            {"name": "Push Ups", "reps": 10, "sets": 3},
            {"name": "Squats", "reps": 15, "sets": 3}
        ],
        "rest_between_sec": 30
    }]
}

fit_bytes = build_fit_workout(workout)
with open("workout.fit", "wb") as f:
    f.write(fit_bytes)

Get Preview Steps (for UI)

from amakaflow_fitfiletool import get_preview_steps

steps = get_preview_steps(workout, use_lap_button=False)
# Returns list of steps exactly as they will appear on the watch

Get Metadata

from amakaflow_fitfiletool import get_fit_metadata

metadata = get_fit_metadata(workout)
# Returns: {"detected_sport": "strength", "exercise_count": 2, ...}

Features

  • Valid FIT SDK Categories: Only uses categories 0-32 (extended categories 33+ are remapped)
  • Smart Exercise Mapping: Built-in keywords for common exercises (run, ski erg, rower, etc.)
  • Sport Type Detection: Automatically detects strength vs cardio vs running
  • Lap Button Support: Option to use lap button press instead of reps/distance
  • Preview Sync: Preview steps match exactly what gets exported

Category Remapping

Invalid FIT SDK categories (33+) are automatically remapped:

  • Categories 33-38 → Cardio (2)
  • Categories 39-43 → Total Body (29)
  • Any other invalid → Total Body (29)

This ensures workouts are accepted by all Garmin watches.

Metadata

Release files for amakaflow-fitfiletool 0.2.6

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

Source distribution (sdist)

Source distribution for amakaflow-fitfiletool 0.2.6
File Size Uploaded
amakaflow_fitfiletool-0.2.6.tar.gz 61.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for amakaflow-fitfiletool 0.2.6
File Interpreter ABI Platform
amakaflow_fitfiletool-0.2.6-py3-none-any.whl Python 3 none any Details

Total release size: 120.3 kB

Release files / amakaflow_fitfiletool-0.2.6.tar.gz

Download URL amakaflow_fitfiletool-0.2.6.tar.gz
Size 61.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f7e4ab26f17adfd8fdfee685ebe7038206c64c96804a9568acb9073890937c20
BLAKE2b-256 checksum
How to use checksums
6709c11ca34e81e92e1ad38b7c2decdc9e11e84dda4a4695f607242fbed54aa2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release files / amakaflow_fitfiletool-0.2.6-py3-none-any.whl

Download URL amakaflow_fitfiletool-0.2.6-py3-none-any.whl
Size 59.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db704cfd04c4a91ac63bfdde643ebe91da63de7b66adeb400337275f05bf1308
BLAKE2b-256 checksum
How to use checksums
15fa7b16a756ec6420433d8bcd22e6d747efc11c854e97d914781df2cd545ca4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.6 This release

2 release files

0.2.5

2 release files

0.2.3

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