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.

Release files for amakaflow-fitfiletool 0.2.5

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.5
File Size Uploaded
amakaflow_fitfiletool-0.2.5.tar.gz 60.5 kB Details

Built distribution (wheel)

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

Total release size: 119.7 kB

Release files / amakaflow_fitfiletool-0.2.5.tar.gz

Download URL amakaflow_fitfiletool-0.2.5.tar.gz
Size 60.5 kB
Tags Source
SHA-256 checksum
How to use checksums
203ab4d596a737afb9ee2bce19718b969fd51ed745154e8929c98a346231bbb9
BLAKE2b-256 checksum
How to use checksums
77c640d4ecf7f680c96818b6e6d5d78b59333ad6267bfbc2bfdcbb91c411b922
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 25, 2026.

Transparency log

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

Download URL amakaflow_fitfiletool-0.2.5-py3-none-any.whl
Size 59.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10f4a1d13ef3af542c0fd523ffdafca0fd3d159026141c77e551aee0c864929a
BLAKE2b-256 checksum
How to use checksums
db67ef6cea9f1c930192ce8575f4e9b642988ebd3b570bb4c7afb50c6510e460
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 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.5 This release

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