Skip to main content

Garmin FIT file loader for SQLite + Grafana

Project description

GraFIT

Loads Garmin FIT files into a SQLite database and visualizes them in Grafana.

GraFIT parses .fit files (activities, sleep, GPS, etc.) using python-fitparse, writes them to SQLite using a schema generated from the FIT profile, and ships with Grafana provisioning (datasource + dashboards) so you can browse the data immediately.

Install

uv tool install grafit

Or run without installing:

uvx grafit <command> [options]

Requires Python 3.11+.

Usage

uv run grafit <command> [options]

Commands

  • init <db_path> — create and initialize the SQLite database.
  • import <path> <db_path> — import a FIT file or directory of FIT files into the database.
    • --force reimport files already present in the database.
    • --no-recursive do not recurse into subdirectories.
  • stats <db_path> — show row counts per table.
  • purge <db_path> --file-hash <sha256> — remove all rows imported from a given file.
  • generate-schema <output> — write the full DDL SQL to a file.
  • install-provisioning <dest> — copy the bundled Grafana provisioning (datasource + dashboards) to a directory.
    • --force overwrite the destination if it exists.

Global flag: -v / --verbose for debug logging.

Grafana

A docker-compose.yml is provided to run Grafana with the SQLite datasource plugin against ./fit_data.db and the bundled dashboards mounted from ./grafana-provisioning.

Note: the bundled compose file enables anonymous admin access and disables the login form. It is intended for local use only — do not expose it to a network.

uvx grafit init fit_data.db
uvx grafit import /path/to/fit/files fit_data.db
uvx grafit install-provisioning ./grafana-provisioning
docker compose up

Grafana is then available at http://localhost:3000.

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

grafit-1.4.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grafit-1.4.0-py3-none-any.whl (36.8 kB view details)

Uploaded Python 3

File details

Details for the file grafit-1.4.0.tar.gz.

File metadata

  • Download URL: grafit-1.4.0.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"10","id":"buster","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for grafit-1.4.0.tar.gz
Algorithm Hash digest
SHA256 59c57f48421c457a1aa995d63bc28c224a0ccf6b4b7eb1fcb82938ba9bbbc7c0
MD5 9578654de595dddb628efbf65f09c884
BLAKE2b-256 7e655b360ab5145f7f920111c0cb9557c9a305693af61876a4b1b5618f359716

See more details on using hashes here.

File details

Details for the file grafit-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: grafit-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 36.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"10","id":"buster","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for grafit-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 942cd3c25f44fc91c5b99cc4830e3083df5995fe56c5fe28d469ac450bfb14a4
MD5 abb6d53f02800befc193af97bd5d0780
BLAKE2b-256 7002b68b80c57702aaa7631ed0ca9b2b868a8932d414d86588ddd36edb6a4c1e

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