garth-0.6.3
0.6.3
0.6.2
0.6.1
0.6.0
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.22.dev0
0.5.21
0.5.20.dev4
0.5.20.dev3
0.5.20.dev2
0.5.20.dev1
0.5.20.dev0
0.5.20
0.5.2
0.5.19.dev0
0.5.19
0.5.18.dev2
0.5.18.dev0
0.5.18
0.5.17
0.5.16
0.5.15
0.5.14
0.5.13
0.5.12
0.5.11
0.5.10
0.5.1
0.5.0
0.4.9
0.4.8
0.4.7
0.4.6
0.4.5
0.4.47
0.4.46
0.4.45
0.4.44
0.4.43
0.4.42
0.4.41
0.4.40
0.4.4
0.4.39
0.4.38
0.4.37
0.4.36
0.4.35
0.4.34
0.4.33
0.4.32
0.4.31
0.4.30
0.4.3
0.4.29
0.4.28
0.4.27
0.4.26
0.4.25
0.4.24
0.4.23
0.4.22
0.4.21
0.4.20
0.4.2
0.4.19
0.4.18
0.4.17
0.4.16
0.4.15
0.4.14
0.4.13
0.4.12
0.4.11
0.4.10
0.4.1
0.4.0
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.9
0.2.8
0.2.7
0.2.6
0.2.5
0.2.4
0.2.3
0.2.1
0.2.0
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.14
0.1.13
0.1.11
0.1.10
0.1.1
0.1.0
0.6.3
0.6.2
0.6.1
0.6.0
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.22.dev0
0.5.21
0.5.20.dev4
0.5.20.dev3
0.5.20.dev2
0.5.20.dev1
0.5.20.dev0
0.5.20
0.5.2
0.5.19.dev0
0.5.19
0.5.18.dev2
0.5.18.dev0
0.5.18
0.5.17
0.5.16
0.5.15
0.5.14
0.5.13
0.5.12
0.5.11
0.5.10
0.5.1
0.5.0
0.4.9
0.4.8
0.4.7
0.4.6
0.4.5
0.4.47
0.4.46
0.4.45
0.4.44
0.4.43
0.4.42
0.4.41
0.4.40
0.4.4
0.4.39
0.4.38
0.4.37
0.4.36
0.4.35
0.4.34
0.4.33
0.4.32
0.4.31
0.4.30
0.4.3
0.4.29
0.4.28
0.4.27
0.4.26
0.4.25
0.4.24
0.4.23
0.4.22
0.4.21
0.4.20
0.4.2
0.4.19
0.4.18
0.4.17
0.4.16
0.4.15
0.4.14
0.4.13
0.4.12
0.4.11
0.4.10
0.4.1
0.4.0
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.9
0.2.8
0.2.7
0.2.6
0.2.5
0.2.4
0.2.3
0.2.1
0.2.0
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.14
0.1.13
0.1.11
0.1.10
0.1.1
0.1.0
توضیحات
Garmin SSO auth + Connect client
| ویژگی | مقدار |
|---|---|
| سیستم عامل | POSIX :: Linux |
| نام فایل | garth-0.6.3 |
| نام | garth |
| نسخه کتابخانه | 0.6.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | Matin Tamizi <mtamizi@duck.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/garth/ |
| مجوز | MIT |
# Garth
[](https://github.com/matin/garth/actions/workflows/ci.yml?query=event%3Apush+branch%3Amain+workflow%3ACI)
[](https://codecov.io/gh/matin/garth)
[](https://pypi.org/project/garth/)
[](https://pypistats.org/packages/garth)
[](https://garth.readthedocs.io)
Garmin SSO auth + Connect Python client
## Features
- OAuth1/OAuth2 authentication (OAuth1 token lasts ~1 year)
- MFA support with custom handlers
- Auto-refresh of OAuth2 token
- Auto-resume from `GARTH_HOME` or `GARTH_TOKEN` environment variables
- Works on Google Colab
- Pydantic dataclasses for validated data
- Full test coverage
## Installation
```bash
pip install garth
```
## Quick Start
### Authenticate and save session
```python
import garth
from getpass import getpass
garth.login(input("Email: "), getpass("Password: "))
garth.save("~/.garth")
```
### Resume session
```python
import garth
from garth.exc import GarthException
garth.resume("~/.garth")
try:
garth.client.username
except GarthException:
# Session is expired. You'll need to log in again
pass
```
Or use environment variables for automatic session restoration:
```bash
export GARTH_HOME=~/.garth
# or
export GARTH_TOKEN="eyJvYXV0aF90b2tlbi..." # from `uvx garth login`
```
```python
import garth
# Session is automatically loaded
garth.client.username
```
### Fetch data
```python
# Get daily stress
garth.DailyStress.list("2023-07-23", 7)
# Get sleep data
garth.SleepData.get("2023-07-20")
# Get weight
garth.WeightData.list("2025-06-01", 30)
# Direct API calls
garth.connectapi("/usersummary-service/stats/stress/weekly/2023-07-05/52")
```
## Documentation
Full documentation at **[garth.readthedocs.io](https://garth.readthedocs.io)**
## MCP Server
[`garth-mcp-server`](https://github.com/matin/garth-mcp-server) is in early development.
To generate your `GARTH_TOKEN`, use `uvx garth login`.
## Star History
<!-- markdownlint-disable MD013 -->
<a href="https://www.star-history.com/#matin/garth&Date">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=matin/garth&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=matin/garth&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=matin/garth&type=Date" />
</picture>
</a>
<!-- markdownlint-enable MD013 -->
نیازمندی
| مقدار | نام |
|---|---|
| - | pydantic<3.0.0,>=1.10.12 |
| - | requests-oauthlib<3.0.0,>=1.3.1 |
| - | requests<3.0.0,>=2.0.0 |
| xtr | mkdocs-material>=9.5; |
| xtr | mkdocs>=1.6; |
| xtr | logfire<5.0,>=2.11; |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl garth-0.6.3:
pip install garth-0.6.3.whl
نصب پکیج tar.gz garth-0.6.3:
pip install garth-0.6.3.tar.gz