activy-checker 0.2.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- activy_checker-0.2.6/CHANGELOG.md +87 -0
- activy_checker-0.2.6/CONTRIBUTING.md +61 -0
- activy_checker-0.2.6/LICENSE +21 -0
- activy_checker-0.2.6/MANIFEST.in +3 -0
- activy_checker-0.2.6/PKG-INFO +178 -0
- activy_checker-0.2.6/README.md +148 -0
- activy_checker-0.2.6/activy_checker/__init__.py +21 -0
- activy_checker-0.2.6/activy_checker/activy.py +238 -0
- activy_checker-0.2.6/activy_checker/cli.py +186 -0
- activy_checker-0.2.6/activy_checker/compare.py +62 -0
- activy_checker-0.2.6/activy_checker/garmin.py +165 -0
- activy_checker-0.2.6/activy_checker/models.py +48 -0
- activy_checker-0.2.6/activy_checker/progress.py +80 -0
- activy_checker-0.2.6/activy_checker/report.py +83 -0
- activy_checker-0.2.6/activy_checker.egg-info/PKG-INFO +178 -0
- activy_checker-0.2.6/activy_checker.egg-info/SOURCES.txt +32 -0
- activy_checker-0.2.6/activy_checker.egg-info/dependency_links.txt +1 -0
- activy_checker-0.2.6/activy_checker.egg-info/entry_points.txt +2 -0
- activy_checker-0.2.6/activy_checker.egg-info/requires.txt +5 -0
- activy_checker-0.2.6/activy_checker.egg-info/top_level.txt +1 -0
- activy_checker-0.2.6/docs/how-it-works.md +144 -0
- activy_checker-0.2.6/docs/troubleshooting.md +121 -0
- activy_checker-0.2.6/docs/usage.md +165 -0
- activy_checker-0.2.6/pyproject.toml +48 -0
- activy_checker-0.2.6/setup.cfg +4 -0
- activy_checker-0.2.6/tests/__init__.py +0 -0
- activy_checker-0.2.6/tests/conftest.py +63 -0
- activy_checker-0.2.6/tests/test_activy.py +238 -0
- activy_checker-0.2.6/tests/test_cli.py +254 -0
- activy_checker-0.2.6/tests/test_compare.py +83 -0
- activy_checker-0.2.6/tests/test_garmin.py +190 -0
- activy_checker-0.2.6/tests/test_models.py +19 -0
- activy_checker-0.2.6/tests/test_progress.py +54 -0
- activy_checker-0.2.6/tests/test_report.py +58 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.6
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- Published on PyPI: `pipx install activy-checker` or `pip install activy-checker`.
|
|
7
|
+
- `publish` workflow: builds, tests and uploads releases to PyPI with Trusted
|
|
8
|
+
Publishing (manual runs can target TestPyPI).
|
|
9
|
+
- PyPI classifiers and Documentation / Changelog links.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- License metadata uses an SPDX expression (`license = "MIT"`, PEP 639).
|
|
13
|
+
- README links are absolute so they also work on the PyPI project page.
|
|
14
|
+
|
|
15
|
+
## 0.2.5
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- `--version` option.
|
|
19
|
+
- README: why this tool exists, and how to request other integrations
|
|
20
|
+
(Strava, Polar, Suunto, …).
|
|
21
|
+
- GitHub issue forms for feature requests / new integrations and bug reports.
|
|
22
|
+
|
|
23
|
+
## 0.2.4
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- Garmin sign-in is quiet: the library's per-strategy warnings (e.g.
|
|
27
|
+
`mobile+cffi returned 429 …`) are no longer printed. They are kept and shown
|
|
28
|
+
under "Garmin sign-in details" if sign-in fails.
|
|
29
|
+
- The MFA prompt says a verification code was emailed and that the tool is
|
|
30
|
+
waiting for it.
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
- `--verbose` to show the Garmin library's sign-in messages.
|
|
34
|
+
|
|
35
|
+
## 0.2.3
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- `--since` defaults to the fixed date `2026-09-01`; pass `--since` to use another start date.
|
|
39
|
+
|
|
40
|
+
## 0.2.2
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
- `--since` now defaults to the first day of the current month (was 30 days ago).
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
- Ctrl+C prints `Aborted.` and exits with code 130 instead of a traceback.
|
|
47
|
+
|
|
48
|
+
## 0.2.1
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
- Activy returned no activities after a long wait: `UserContestFeed` was
|
|
52
|
+
queried without `UserId`, which the API rejects, so the client fell back to
|
|
53
|
+
a feed that ignores paging and re-read the same page up to 500 times.
|
|
54
|
+
- Paging now also stops when a feed returns the same page twice.
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
- Live progress line while Activy is scanned (page, activities found, date
|
|
58
|
+
reached) and spinners for Garmin steps; drawn on stderr, only in a terminal.
|
|
59
|
+
- A warning when no Activy activities are found.
|
|
60
|
+
|
|
61
|
+
## 0.2.0
|
|
62
|
+
|
|
63
|
+
### Fixed
|
|
64
|
+
- `--garmin-tokenstore` now works: the Garmin session is actually saved after
|
|
65
|
+
the first login (the previous code targeted an API removed in
|
|
66
|
+
`garminconnect` 0.3), and the first run prompts for the password instead of
|
|
67
|
+
failing.
|
|
68
|
+
- Matching picks the Garmin activity with the closest duration, not the first
|
|
69
|
+
one within the tolerance.
|
|
70
|
+
- Network errors are reported as `Activy error: …` / `Garmin error: …` with
|
|
71
|
+
exit codes 2 / 3 instead of a traceback.
|
|
72
|
+
- Per-kind distances in the JSON summary are rounded.
|
|
73
|
+
|
|
74
|
+
### Added
|
|
75
|
+
- Activy step-count entries are excluded by default; `--include-steps` keeps them.
|
|
76
|
+
- `--duration-tolerance` and `--distance-tolerance` options.
|
|
77
|
+
- Documentation: usage, how it works, troubleshooting, contributing.
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
- Requires Python 3.12+ (the minimum supported by `garminconnect`).
|
|
81
|
+
|
|
82
|
+
## 0.1.0
|
|
83
|
+
|
|
84
|
+
- Initial release: fetch activities from Activy and Garmin Connect, report
|
|
85
|
+
activities missing in either service and distance mismatches, per-kind
|
|
86
|
+
summaries and JSON export.
|
|
87
|
+
- Offline test suite and CI.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for helping! Bug reports, fixes and support for new activity types are
|
|
4
|
+
all welcome.
|
|
5
|
+
|
|
6
|
+
Would you like another service compared with Activy (Strava, Polar, Suunto, …)?
|
|
7
|
+
Please [open a feature request](https://github.com/kaftee/activy-checker/issues/new?template=feature_request.yml)
|
|
8
|
+
first, so we can discuss it before any code is written.
|
|
9
|
+
|
|
10
|
+
## Development setup
|
|
11
|
+
|
|
12
|
+
Requires Python 3.12+.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git clone https://github.com/kaftee/activy-checker.git
|
|
16
|
+
cd activy-checker
|
|
17
|
+
python3 -m venv .venv && source .venv/bin/activate
|
|
18
|
+
pip install -e ".[dev]"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Running the tests
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pytest # quick run
|
|
25
|
+
pytest --cov=activy_checker --cov-report=term-missing
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The suite runs fully **offline**. The Activy and Garmin clients are replaced by
|
|
29
|
+
in-memory fakes (see `tests/conftest.py` and the `Fake*` classes in the tests),
|
|
30
|
+
so no accounts or network access are needed. CI runs the same tests on
|
|
31
|
+
Python 3.12, 3.13 and 3.14 for every push and pull request.
|
|
32
|
+
|
|
33
|
+
## Guidelines
|
|
34
|
+
|
|
35
|
+
- **Never commit personal data.** Test fixtures must be synthetic: no real
|
|
36
|
+
emails, user ids, activity ids, tokens, or exported API responses from a real
|
|
37
|
+
account. `.gitignore` already excludes token files and local exports.
|
|
38
|
+
- Add or update tests for any behaviour change.
|
|
39
|
+
- Keep the Activy client dependency-free (standard library only).
|
|
40
|
+
- When adding a Garmin `typeKey` or an Activy `ActivityType`, update the
|
|
41
|
+
mapping, its test, and the tables in [docs/how-it-works.md](docs/how-it-works.md).
|
|
42
|
+
- Code, comments and documentation are in English.
|
|
43
|
+
|
|
44
|
+
## Releasing (maintainers)
|
|
45
|
+
|
|
46
|
+
Releases are published to PyPI by the `publish` GitHub Actions workflow using
|
|
47
|
+
[Trusted Publishing](https://docs.pypi.org/trusted-publishers/), so no API
|
|
48
|
+
tokens are stored anywhere.
|
|
49
|
+
|
|
50
|
+
1. Bump `version` in `pyproject.toml` and `__version__` in
|
|
51
|
+
`activy_checker/__init__.py`, and add a `CHANGELOG.md` entry.
|
|
52
|
+
2. Optional dry run: in the Actions tab, run **publish** manually with
|
|
53
|
+
`testpypi`, then check `pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ activy-checker`.
|
|
54
|
+
3. Create a GitHub release with tag `vX.Y.Z` matching the version. Publishing
|
|
55
|
+
the release uploads it to PyPI.
|
|
56
|
+
|
|
57
|
+
## Reporting a bug
|
|
58
|
+
|
|
59
|
+
Please include the command you ran, the error output, and your Python and
|
|
60
|
+
`garminconnect` versions (`pip show garminconnect`). Remove any email
|
|
61
|
+
addresses, tokens and activity details you do not want to share.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Michał Kaftański
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: activy-checker
|
|
3
|
+
Version: 0.2.6
|
|
4
|
+
Summary: Audit Activy's activity sync: detect missing activities and incorrect distances.
|
|
5
|
+
Author: Michał Kaftański
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/kaftee/activy-checker
|
|
8
|
+
Project-URL: Documentation, https://github.com/kaftee/activy-checker/blob/main/docs/usage.md
|
|
9
|
+
Project-URL: Changelog, https://github.com/kaftee/activy-checker/blob/main/CHANGELOG.md
|
|
10
|
+
Project-URL: Issues, https://github.com/kaftee/activy-checker/issues
|
|
11
|
+
Keywords: activy,garmin,fitness,activities,sync
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Requires-Python: >=3.12
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: garminconnect>=0.3.0
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# activy-checker
|
|
32
|
+
|
|
33
|
+
[](https://github.com/kaftee/activy-checker/actions/workflows/tests.yml)
|
|
34
|
+
|
|
35
|
+
Audit [Activy](https://activy.app)'s activity sync: detect activities that
|
|
36
|
+
never arrived and activities recorded with incorrect distances — and get a
|
|
37
|
+
clean summary of your training. It currently compares Activy with
|
|
38
|
+
[Garmin Connect](https://connect.garmin.com); other sources can be
|
|
39
|
+
[requested](https://github.com/kaftee/activy-checker#other-integrations).
|
|
40
|
+
|
|
41
|
+
Activy imports workouts from Garmin, but the import is not always complete: a
|
|
42
|
+
ride can silently never appear, or show up with the wrong distance. If Activy
|
|
43
|
+
powers a company or charity challenge, those gaps cost you points.
|
|
44
|
+
`activy-checker` logs into **your** two accounts, pulls your activities for a
|
|
45
|
+
date range and tells you exactly what is different.
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Matched: 5 | Missing in Activy: 1 | Missing in Garmin: 0 | Distance mismatches: 1
|
|
49
|
+
|
|
50
|
+
-- Missing in Activy (present in Garmin, not imported) [1] --
|
|
51
|
+
2026-05-10 road_biking 98.40 km 3:12:00
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Why I built this
|
|
55
|
+
|
|
56
|
+
Activy's import from Garmin is not 100% reliable. I found out by pure chance:
|
|
57
|
+
one day I noticed that an activity recorded on my Garmin had never appeared in
|
|
58
|
+
Activy. Nothing warned me — not the app, not Activy.
|
|
59
|
+
|
|
60
|
+
When I contacted Activy support, I was not told about any errors on their
|
|
61
|
+
side, and they were not willing to look at the history of my earlier
|
|
62
|
+
activities to check whether anything else was missing. I found that strange:
|
|
63
|
+
if one activity can silently go missing, others can too, and I had no way to
|
|
64
|
+
check.
|
|
65
|
+
|
|
66
|
+
That is why I wrote `activy-checker` — so that anyone can verify their own
|
|
67
|
+
Activy history against Garmin instead of relying on luck.
|
|
68
|
+
|
|
69
|
+
## Features
|
|
70
|
+
|
|
71
|
+
- **Missing in Activy** — activities recorded on Garmin that never reached Activy.
|
|
72
|
+
- **Missing in Garmin** — activities that exist only in Activy (e.g. manual entries).
|
|
73
|
+
- **Distance mismatches** — the same activity stored with a different distance.
|
|
74
|
+
- **Summaries** — count, distance and time per activity kind, for each source.
|
|
75
|
+
- **JSON export** of everything above, for your own scripts or a support ticket.
|
|
76
|
+
- Passwords are prompted with `getpass` and never stored; the Garmin session can
|
|
77
|
+
optionally be cached so MFA is needed only once.
|
|
78
|
+
|
|
79
|
+
## Disclaimer
|
|
80
|
+
|
|
81
|
+
This is an **unofficial** tool, not affiliated with or endorsed by Activy or
|
|
82
|
+
Garmin. Activy has no public API, so `activy-checker` talks to the same mobile
|
|
83
|
+
endpoints the Activy app uses, signing in with your own credentials. Use it only
|
|
84
|
+
with **your own account and your own data**, at your own risk. The Activy API
|
|
85
|
+
can change without notice and break the tool.
|
|
86
|
+
|
|
87
|
+
## Quick start
|
|
88
|
+
|
|
89
|
+
Requires **Python 3.12+**. The easiest way is [pipx](https://pipx.pypa.io),
|
|
90
|
+
which installs the command in its own environment:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
pipx install activy-checker
|
|
94
|
+
activy-checker --garmin-tokenstore ~/.garminconnect
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
or with pip: `pip install activy-checker`. To work on the code, see
|
|
98
|
+
[Contributing](https://github.com/kaftee/activy-checker/blob/main/CONTRIBUTING.md).
|
|
99
|
+
|
|
100
|
+
You will be asked for your Activy email and password, then your Garmin email
|
|
101
|
+
and password and — if your Garmin account uses two-step verification — the
|
|
102
|
+
code Garmin emails you.
|
|
103
|
+
|
|
104
|
+
## Common commands
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
activy-checker # from 2026-09-01 (default)
|
|
108
|
+
activy-checker --since 2026-09-01 --until 2026-09-30
|
|
109
|
+
activy-checker --activy-only # just summarize Activy
|
|
110
|
+
activy-checker --garmin-tokenstore ~/.garminconnect # cache Garmin session
|
|
111
|
+
activy-checker --since 2026-09-01 --json result.json # machine-readable output
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
All options are described in [docs/usage.md](https://github.com/kaftee/activy-checker/blob/main/docs/usage.md).
|
|
115
|
+
|
|
116
|
+
## Example output
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
== Activy ==
|
|
120
|
+
|
|
121
|
+
Kind Count Distance Time
|
|
122
|
+
----------------------------------------
|
|
123
|
+
Bike 2 103.5 km 3:31:00
|
|
124
|
+
Run 2 9.3 km 1:27:00
|
|
125
|
+
Exercise 1 0.0 km 0:25:00
|
|
126
|
+
----------------------------------------
|
|
127
|
+
TOTAL 5 112.8 km 5:23:00
|
|
128
|
+
|
|
129
|
+
== Garmin ==
|
|
130
|
+
|
|
131
|
+
Kind Count Distance Time
|
|
132
|
+
----------------------------------------
|
|
133
|
+
Bike 3 201.9 km 6:43:01
|
|
134
|
+
Run 1 5.2 km 0:32:01
|
|
135
|
+
Walk 1 9.9 km 0:55:01
|
|
136
|
+
Exercise 1 0.0 km 0:25:00
|
|
137
|
+
----------------------------------------
|
|
138
|
+
TOTAL 6 217.0 km 8:35:03
|
|
139
|
+
|
|
140
|
+
== Comparison: Activy vs Garmin ==
|
|
141
|
+
|
|
142
|
+
Matched: 5 | Missing in Activy: 1 | Missing in Garmin: 0 | Distance mismatches: 1
|
|
143
|
+
|
|
144
|
+
-- Missing in Activy (present in Garmin, not imported) [1] --
|
|
145
|
+
2026-05-10 road_biking 98.40 km 3:12:00
|
|
146
|
+
|
|
147
|
+
-- Missing in Garmin (present in Activy only) [0] --
|
|
148
|
+
(none)
|
|
149
|
+
|
|
150
|
+
-- Distance mismatches (same activity, different distance) [1] --
|
|
151
|
+
2026-05-05 Activy 4.10 km vs Garmin 9.87 km (Δ -5.77 km)
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
(Sample data.) Note that the two summaries use each service's own categories:
|
|
155
|
+
Activy files Garmin walks and hikes under **Run**, so kinds are not expected to
|
|
156
|
+
line up one-to-one — the comparison matches individual activities, not kinds.
|
|
157
|
+
|
|
158
|
+
## Documentation
|
|
159
|
+
|
|
160
|
+
- [Usage](https://github.com/kaftee/activy-checker/blob/main/docs/usage.md) — every option, exit codes, JSON format, using it as a library
|
|
161
|
+
- [How it works](https://github.com/kaftee/activy-checker/blob/main/docs/how-it-works.md) — the Activy API, fetching, matching rules, type mapping
|
|
162
|
+
- [Troubleshooting](https://github.com/kaftee/activy-checker/blob/main/docs/troubleshooting.md) — login problems, Garmin rate limits, reading the results
|
|
163
|
+
- [Contributing](https://github.com/kaftee/activy-checker/blob/main/CONTRIBUTING.md) — development setup, tests and releases
|
|
164
|
+
- [Changelog](https://github.com/kaftee/activy-checker/blob/main/CHANGELOG.md)
|
|
165
|
+
|
|
166
|
+
## Other integrations
|
|
167
|
+
|
|
168
|
+
`activy-checker` currently compares Activy with **Garmin Connect** only. If
|
|
169
|
+
you use Activy with **Strava**, **Polar**, **Suunto** or another service and
|
|
170
|
+
would like it supported, please
|
|
171
|
+
[open a feature request](https://github.com/kaftee/activy-checker/issues/new?template=feature_request.yml)
|
|
172
|
+
and tell us which service you use.
|
|
173
|
+
|
|
174
|
+
Found a bug? [Report it here](https://github.com/kaftee/activy-checker/issues/new?template=bug_report.yml).
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
MIT — see [LICENSE](https://github.com/kaftee/activy-checker/blob/main/LICENSE).
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# activy-checker
|
|
2
|
+
|
|
3
|
+
[](https://github.com/kaftee/activy-checker/actions/workflows/tests.yml)
|
|
4
|
+
|
|
5
|
+
Audit [Activy](https://activy.app)'s activity sync: detect activities that
|
|
6
|
+
never arrived and activities recorded with incorrect distances — and get a
|
|
7
|
+
clean summary of your training. It currently compares Activy with
|
|
8
|
+
[Garmin Connect](https://connect.garmin.com); other sources can be
|
|
9
|
+
[requested](https://github.com/kaftee/activy-checker#other-integrations).
|
|
10
|
+
|
|
11
|
+
Activy imports workouts from Garmin, but the import is not always complete: a
|
|
12
|
+
ride can silently never appear, or show up with the wrong distance. If Activy
|
|
13
|
+
powers a company or charity challenge, those gaps cost you points.
|
|
14
|
+
`activy-checker` logs into **your** two accounts, pulls your activities for a
|
|
15
|
+
date range and tells you exactly what is different.
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Matched: 5 | Missing in Activy: 1 | Missing in Garmin: 0 | Distance mismatches: 1
|
|
19
|
+
|
|
20
|
+
-- Missing in Activy (present in Garmin, not imported) [1] --
|
|
21
|
+
2026-05-10 road_biking 98.40 km 3:12:00
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Why I built this
|
|
25
|
+
|
|
26
|
+
Activy's import from Garmin is not 100% reliable. I found out by pure chance:
|
|
27
|
+
one day I noticed that an activity recorded on my Garmin had never appeared in
|
|
28
|
+
Activy. Nothing warned me — not the app, not Activy.
|
|
29
|
+
|
|
30
|
+
When I contacted Activy support, I was not told about any errors on their
|
|
31
|
+
side, and they were not willing to look at the history of my earlier
|
|
32
|
+
activities to check whether anything else was missing. I found that strange:
|
|
33
|
+
if one activity can silently go missing, others can too, and I had no way to
|
|
34
|
+
check.
|
|
35
|
+
|
|
36
|
+
That is why I wrote `activy-checker` — so that anyone can verify their own
|
|
37
|
+
Activy history against Garmin instead of relying on luck.
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
- **Missing in Activy** — activities recorded on Garmin that never reached Activy.
|
|
42
|
+
- **Missing in Garmin** — activities that exist only in Activy (e.g. manual entries).
|
|
43
|
+
- **Distance mismatches** — the same activity stored with a different distance.
|
|
44
|
+
- **Summaries** — count, distance and time per activity kind, for each source.
|
|
45
|
+
- **JSON export** of everything above, for your own scripts or a support ticket.
|
|
46
|
+
- Passwords are prompted with `getpass` and never stored; the Garmin session can
|
|
47
|
+
optionally be cached so MFA is needed only once.
|
|
48
|
+
|
|
49
|
+
## Disclaimer
|
|
50
|
+
|
|
51
|
+
This is an **unofficial** tool, not affiliated with or endorsed by Activy or
|
|
52
|
+
Garmin. Activy has no public API, so `activy-checker` talks to the same mobile
|
|
53
|
+
endpoints the Activy app uses, signing in with your own credentials. Use it only
|
|
54
|
+
with **your own account and your own data**, at your own risk. The Activy API
|
|
55
|
+
can change without notice and break the tool.
|
|
56
|
+
|
|
57
|
+
## Quick start
|
|
58
|
+
|
|
59
|
+
Requires **Python 3.12+**. The easiest way is [pipx](https://pipx.pypa.io),
|
|
60
|
+
which installs the command in its own environment:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pipx install activy-checker
|
|
64
|
+
activy-checker --garmin-tokenstore ~/.garminconnect
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
or with pip: `pip install activy-checker`. To work on the code, see
|
|
68
|
+
[Contributing](https://github.com/kaftee/activy-checker/blob/main/CONTRIBUTING.md).
|
|
69
|
+
|
|
70
|
+
You will be asked for your Activy email and password, then your Garmin email
|
|
71
|
+
and password and — if your Garmin account uses two-step verification — the
|
|
72
|
+
code Garmin emails you.
|
|
73
|
+
|
|
74
|
+
## Common commands
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
activy-checker # from 2026-09-01 (default)
|
|
78
|
+
activy-checker --since 2026-09-01 --until 2026-09-30
|
|
79
|
+
activy-checker --activy-only # just summarize Activy
|
|
80
|
+
activy-checker --garmin-tokenstore ~/.garminconnect # cache Garmin session
|
|
81
|
+
activy-checker --since 2026-09-01 --json result.json # machine-readable output
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
All options are described in [docs/usage.md](https://github.com/kaftee/activy-checker/blob/main/docs/usage.md).
|
|
85
|
+
|
|
86
|
+
## Example output
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
== Activy ==
|
|
90
|
+
|
|
91
|
+
Kind Count Distance Time
|
|
92
|
+
----------------------------------------
|
|
93
|
+
Bike 2 103.5 km 3:31:00
|
|
94
|
+
Run 2 9.3 km 1:27:00
|
|
95
|
+
Exercise 1 0.0 km 0:25:00
|
|
96
|
+
----------------------------------------
|
|
97
|
+
TOTAL 5 112.8 km 5:23:00
|
|
98
|
+
|
|
99
|
+
== Garmin ==
|
|
100
|
+
|
|
101
|
+
Kind Count Distance Time
|
|
102
|
+
----------------------------------------
|
|
103
|
+
Bike 3 201.9 km 6:43:01
|
|
104
|
+
Run 1 5.2 km 0:32:01
|
|
105
|
+
Walk 1 9.9 km 0:55:01
|
|
106
|
+
Exercise 1 0.0 km 0:25:00
|
|
107
|
+
----------------------------------------
|
|
108
|
+
TOTAL 6 217.0 km 8:35:03
|
|
109
|
+
|
|
110
|
+
== Comparison: Activy vs Garmin ==
|
|
111
|
+
|
|
112
|
+
Matched: 5 | Missing in Activy: 1 | Missing in Garmin: 0 | Distance mismatches: 1
|
|
113
|
+
|
|
114
|
+
-- Missing in Activy (present in Garmin, not imported) [1] --
|
|
115
|
+
2026-05-10 road_biking 98.40 km 3:12:00
|
|
116
|
+
|
|
117
|
+
-- Missing in Garmin (present in Activy only) [0] --
|
|
118
|
+
(none)
|
|
119
|
+
|
|
120
|
+
-- Distance mismatches (same activity, different distance) [1] --
|
|
121
|
+
2026-05-05 Activy 4.10 km vs Garmin 9.87 km (Δ -5.77 km)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
(Sample data.) Note that the two summaries use each service's own categories:
|
|
125
|
+
Activy files Garmin walks and hikes under **Run**, so kinds are not expected to
|
|
126
|
+
line up one-to-one — the comparison matches individual activities, not kinds.
|
|
127
|
+
|
|
128
|
+
## Documentation
|
|
129
|
+
|
|
130
|
+
- [Usage](https://github.com/kaftee/activy-checker/blob/main/docs/usage.md) — every option, exit codes, JSON format, using it as a library
|
|
131
|
+
- [How it works](https://github.com/kaftee/activy-checker/blob/main/docs/how-it-works.md) — the Activy API, fetching, matching rules, type mapping
|
|
132
|
+
- [Troubleshooting](https://github.com/kaftee/activy-checker/blob/main/docs/troubleshooting.md) — login problems, Garmin rate limits, reading the results
|
|
133
|
+
- [Contributing](https://github.com/kaftee/activy-checker/blob/main/CONTRIBUTING.md) — development setup, tests and releases
|
|
134
|
+
- [Changelog](https://github.com/kaftee/activy-checker/blob/main/CHANGELOG.md)
|
|
135
|
+
|
|
136
|
+
## Other integrations
|
|
137
|
+
|
|
138
|
+
`activy-checker` currently compares Activy with **Garmin Connect** only. If
|
|
139
|
+
you use Activy with **Strava**, **Polar**, **Suunto** or another service and
|
|
140
|
+
would like it supported, please
|
|
141
|
+
[open a feature request](https://github.com/kaftee/activy-checker/issues/new?template=feature_request.yml)
|
|
142
|
+
and tell us which service you use.
|
|
143
|
+
|
|
144
|
+
Found a bug? [Report it here](https://github.com/kaftee/activy-checker/issues/new?template=bug_report.yml).
|
|
145
|
+
|
|
146
|
+
## License
|
|
147
|
+
|
|
148
|
+
MIT — see [LICENSE](https://github.com/kaftee/activy-checker/blob/main/LICENSE).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""activy-checker: audit Activy's activity sync."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from .activy import ActivyClient
|
|
5
|
+
from .compare import CompareResult, Match, compare
|
|
6
|
+
from .garmin import GarminClient
|
|
7
|
+
from .models import Activity
|
|
8
|
+
from .report import render_comparison, render_summary, summarize
|
|
9
|
+
|
|
10
|
+
__version__ = "0.2.6"
|
|
11
|
+
__all__ = [
|
|
12
|
+
"ActivyClient",
|
|
13
|
+
"GarminClient",
|
|
14
|
+
"Activity",
|
|
15
|
+
"compare",
|
|
16
|
+
"CompareResult",
|
|
17
|
+
"Match",
|
|
18
|
+
"summarize",
|
|
19
|
+
"render_summary",
|
|
20
|
+
"render_comparison",
|
|
21
|
+
]
|