fitbit-cli 1.3.0__tar.gz → 1.4.0__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.
- {fitbit_cli-1.3.0/fitbit_cli.egg-info → fitbit_cli-1.4.0}/PKG-INFO +24 -25
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/README.md +20 -19
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/fitbit_cli/__init__.py +1 -1
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/fitbit_cli/cli.py +13 -7
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/fitbit_cli/fitbit_api.py +14 -0
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/fitbit_cli/formatter.py +29 -0
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/fitbit_cli/main.py +3 -1
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0/fitbit_cli.egg-info}/PKG-INFO +24 -25
- fitbit_cli-1.4.0/fitbit_cli.egg-info/requires.txt +2 -0
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/setup.py +2 -4
- fitbit_cli-1.3.0/fitbit_cli.egg-info/requires.txt +0 -2
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/LICENSE +0 -0
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/MANIFEST.in +0 -0
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/fitbit_cli/exceptions.py +0 -0
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/fitbit_cli/fitbit_setup.py +0 -0
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/fitbit_cli.egg-info/SOURCES.txt +0 -0
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/fitbit_cli.egg-info/dependency_links.txt +0 -0
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/fitbit_cli.egg-info/entry_points.txt +0 -0
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/fitbit_cli.egg-info/top_level.txt +0 -0
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/pyproject.toml +0 -0
- {fitbit_cli-1.3.0 → fitbit_cli-1.4.0}/setup.cfg +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fitbit-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: Access your Fitbit data at your terminal.
|
|
5
5
|
Home-page: https://github.com/veerendra2/fitbit-cli
|
|
6
|
-
Download-URL: https://github.com/veerendra2/fitbit-cli/archive/1.
|
|
6
|
+
Download-URL: https://github.com/veerendra2/fitbit-cli/archive/1.4.0.tar.gz
|
|
7
7
|
Author: veerendra2
|
|
8
8
|
Author-email: vk.tyk23@simplelogin.com
|
|
9
9
|
License: MIT
|
|
@@ -16,8 +16,6 @@ Classifier: Natural Language :: English
|
|
|
16
16
|
Classifier: Operating System :: MacOS
|
|
17
17
|
Classifier: Operating System :: POSIX :: Linux
|
|
18
18
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
21
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
21
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -27,8 +25,8 @@ Classifier: Topic :: Utilities
|
|
|
27
25
|
Requires-Python: >=3.9
|
|
28
26
|
Description-Content-Type: text/markdown
|
|
29
27
|
License-File: LICENSE
|
|
30
|
-
Requires-Dist: requests==2.32.
|
|
31
|
-
Requires-Dist: rich==14.
|
|
28
|
+
Requires-Dist: requests==2.32.4
|
|
29
|
+
Requires-Dist: rich==14.1.0
|
|
32
30
|
Dynamic: author
|
|
33
31
|
Dynamic: author-email
|
|
34
32
|
Dynamic: classifier
|
|
@@ -55,7 +53,7 @@ Dynamic: summary
|
|
|
55
53
|
Access your Fitbit data directly from your terminal 💻. View 💤 sleep logs, ❤️ heart rate, 🏋️♂️ activity levels, 🩸 SpO2, and more, all presented in a simple, easy-to-read table format!
|
|
56
54
|
|
|
57
55
|
<p align="center">
|
|
58
|
-
<img alt="Fitbit logo", width="
|
|
56
|
+
<img alt="Fitbit logo", width="350" src="https://raw.githubusercontent.com/veerendra2/fitbit-cli/refs/heads/main/assets/Fitbit_Logo_White_RGB.jpg">
|
|
59
57
|
</p>
|
|
60
58
|
|
|
61
59
|
[](https://asciinema.org/a/696114)
|
|
@@ -64,14 +62,16 @@ Access your Fitbit data directly from your terminal 💻. View 💤 sleep logs,
|
|
|
64
62
|
|
|
65
63
|
> Only `GET` APIs are supported!
|
|
66
64
|
|
|
67
|
-
| API
|
|
68
|
-
|
|
|
69
|
-
| [
|
|
70
|
-
| [
|
|
71
|
-
| [
|
|
72
|
-
| [
|
|
73
|
-
| [
|
|
74
|
-
| [
|
|
65
|
+
| API | Status |
|
|
66
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
|
|
67
|
+
| [Get Profile](https://dev.fitbit.com/build/reference/web-api/user/get-profile/) | ✅ |
|
|
68
|
+
| [Get Devices](https://dev.fitbit.com/build/reference/web-api/devices/get-devices/) | ✅ |
|
|
69
|
+
| [Get Sleep Log by Date Range](https://dev.fitbit.com/build/reference/web-api/sleep/get-sleep-log-by-date-range/) | ✅ |
|
|
70
|
+
| [Get SpO2 Summary by Interval](https://dev.fitbit.com/build/reference/web-api/spo2/get-spo2-summary-by-interval/) | ✅ |
|
|
71
|
+
| [Get Heart Rate Time Series by Date Range](https://dev.fitbit.com/build/reference/web-api/heartrate-timeseries/get-heartrate-timeseries-by-date-range/) | ✅ |
|
|
72
|
+
| [Get AZM Time Series by Interval](https://dev.fitbit.com/build/reference/web-api/active-zone-minutes-timeseries/get-azm-timeseries-by-interval/) | ✅ |
|
|
73
|
+
| [Get Breathing Rate Summary by Interval](https://dev.fitbit.com/build/reference/web-api/breathing-rate/get-br-summary-by-interval/) | ✅ |
|
|
74
|
+
| [Get Daily Activity Summary](https://dev.fitbit.com/build/reference/web-api/activity/get-daily-activity-summary/) | ⏳ |
|
|
75
75
|
|
|
76
76
|
## Usage Guide
|
|
77
77
|
|
|
@@ -84,9 +84,8 @@ python -m pip install fitbit-cli
|
|
|
84
84
|
2. See Help
|
|
85
85
|
|
|
86
86
|
```bash
|
|
87
|
-
fitbit-cli -h
|
|
88
|
-
usage: fitbit-cli [-h] [-i] [-s [DATE[,DATE]|RELATIVE]] [-o [DATE[,DATE]|RELATIVE]] [-e [DATE[,DATE]|RELATIVE]] [-a [DATE[,DATE]|RELATIVE]]
|
|
89
|
-
[-b [DATE[,DATE]|RELATIVE]] [-u] [-v]
|
|
87
|
+
$ fitbit-cli -h
|
|
88
|
+
usage: fitbit-cli [-h] [-i] [-s [DATE[,DATE]|RELATIVE]] [-o [DATE[,DATE]|RELATIVE]] [-e [DATE[,DATE]|RELATIVE]] [-a [DATE[,DATE]|RELATIVE]] [-b [DATE[,DATE]|RELATIVE]] [-u] [-d] [-v]
|
|
90
89
|
|
|
91
90
|
Fitbit CLI -- Access your Fitbit data at your terminal.
|
|
92
91
|
|
|
@@ -101,17 +100,17 @@ APIs:
|
|
|
101
100
|
If not provided, defaults to today's date.
|
|
102
101
|
|
|
103
102
|
-s, --sleep [DATE[,DATE]|RELATIVE]
|
|
104
|
-
Show
|
|
103
|
+
Show Sleep Log by Date Range.
|
|
105
104
|
-o, --spo2 [DATE[,DATE]|RELATIVE]
|
|
106
|
-
Show SpO2
|
|
105
|
+
Show SpO2 Summary by Interval.
|
|
107
106
|
-e, --heart [DATE[,DATE]|RELATIVE]
|
|
108
|
-
Show Heart Rate Time Series
|
|
107
|
+
Show Heart Rate Time Series by Date Range.
|
|
109
108
|
-a, --active-zone [DATE[,DATE]|RELATIVE]
|
|
110
|
-
Show
|
|
109
|
+
Show AZM Time Series by Interval.
|
|
111
110
|
-b, --breathing-rate [DATE[,DATE]|RELATIVE]
|
|
112
|
-
Show Breathing Rate Summary
|
|
113
|
-
-u, --
|
|
114
|
-
|
|
111
|
+
Show Breathing Rate Summary by Interval.
|
|
112
|
+
-u, --user-profile Show Profile.
|
|
113
|
+
-d, --devices Show Devices.
|
|
115
114
|
```
|
|
116
115
|
|
|
117
116
|
3. Register Fitbit App
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
Access your Fitbit data directly from your terminal 💻. View 💤 sleep logs, ❤️ heart rate, 🏋️♂️ activity levels, 🩸 SpO2, and more, all presented in a simple, easy-to-read table format!
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<img alt="Fitbit logo", width="
|
|
12
|
+
<img alt="Fitbit logo", width="350" src="https://raw.githubusercontent.com/veerendra2/fitbit-cli/refs/heads/main/assets/Fitbit_Logo_White_RGB.jpg">
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
[](https://asciinema.org/a/696114)
|
|
@@ -18,14 +18,16 @@ Access your Fitbit data directly from your terminal 💻. View 💤 sleep logs,
|
|
|
18
18
|
|
|
19
19
|
> Only `GET` APIs are supported!
|
|
20
20
|
|
|
21
|
-
| API
|
|
22
|
-
|
|
|
23
|
-
| [
|
|
24
|
-
| [
|
|
25
|
-
| [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
28
|
-
| [
|
|
21
|
+
| API | Status |
|
|
22
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
|
|
23
|
+
| [Get Profile](https://dev.fitbit.com/build/reference/web-api/user/get-profile/) | ✅ |
|
|
24
|
+
| [Get Devices](https://dev.fitbit.com/build/reference/web-api/devices/get-devices/) | ✅ |
|
|
25
|
+
| [Get Sleep Log by Date Range](https://dev.fitbit.com/build/reference/web-api/sleep/get-sleep-log-by-date-range/) | ✅ |
|
|
26
|
+
| [Get SpO2 Summary by Interval](https://dev.fitbit.com/build/reference/web-api/spo2/get-spo2-summary-by-interval/) | ✅ |
|
|
27
|
+
| [Get Heart Rate Time Series by Date Range](https://dev.fitbit.com/build/reference/web-api/heartrate-timeseries/get-heartrate-timeseries-by-date-range/) | ✅ |
|
|
28
|
+
| [Get AZM Time Series by Interval](https://dev.fitbit.com/build/reference/web-api/active-zone-minutes-timeseries/get-azm-timeseries-by-interval/) | ✅ |
|
|
29
|
+
| [Get Breathing Rate Summary by Interval](https://dev.fitbit.com/build/reference/web-api/breathing-rate/get-br-summary-by-interval/) | ✅ |
|
|
30
|
+
| [Get Daily Activity Summary](https://dev.fitbit.com/build/reference/web-api/activity/get-daily-activity-summary/) | ⏳ |
|
|
29
31
|
|
|
30
32
|
## Usage Guide
|
|
31
33
|
|
|
@@ -38,9 +40,8 @@ python -m pip install fitbit-cli
|
|
|
38
40
|
2. See Help
|
|
39
41
|
|
|
40
42
|
```bash
|
|
41
|
-
fitbit-cli -h
|
|
42
|
-
usage: fitbit-cli [-h] [-i] [-s [DATE[,DATE]|RELATIVE]] [-o [DATE[,DATE]|RELATIVE]] [-e [DATE[,DATE]|RELATIVE]] [-a [DATE[,DATE]|RELATIVE]]
|
|
43
|
-
[-b [DATE[,DATE]|RELATIVE]] [-u] [-v]
|
|
43
|
+
$ fitbit-cli -h
|
|
44
|
+
usage: fitbit-cli [-h] [-i] [-s [DATE[,DATE]|RELATIVE]] [-o [DATE[,DATE]|RELATIVE]] [-e [DATE[,DATE]|RELATIVE]] [-a [DATE[,DATE]|RELATIVE]] [-b [DATE[,DATE]|RELATIVE]] [-u] [-d] [-v]
|
|
44
45
|
|
|
45
46
|
Fitbit CLI -- Access your Fitbit data at your terminal.
|
|
46
47
|
|
|
@@ -55,17 +56,17 @@ APIs:
|
|
|
55
56
|
If not provided, defaults to today's date.
|
|
56
57
|
|
|
57
58
|
-s, --sleep [DATE[,DATE]|RELATIVE]
|
|
58
|
-
Show
|
|
59
|
+
Show Sleep Log by Date Range.
|
|
59
60
|
-o, --spo2 [DATE[,DATE]|RELATIVE]
|
|
60
|
-
Show SpO2
|
|
61
|
+
Show SpO2 Summary by Interval.
|
|
61
62
|
-e, --heart [DATE[,DATE]|RELATIVE]
|
|
62
|
-
Show Heart Rate Time Series
|
|
63
|
+
Show Heart Rate Time Series by Date Range.
|
|
63
64
|
-a, --active-zone [DATE[,DATE]|RELATIVE]
|
|
64
|
-
Show
|
|
65
|
+
Show AZM Time Series by Interval.
|
|
65
66
|
-b, --breathing-rate [DATE[,DATE]|RELATIVE]
|
|
66
|
-
Show Breathing Rate Summary
|
|
67
|
-
-u, --
|
|
68
|
-
|
|
67
|
+
Show Breathing Rate Summary by Interval.
|
|
68
|
+
-u, --user-profile Show Profile.
|
|
69
|
+
-d, --devices Show Devices.
|
|
69
70
|
```
|
|
70
71
|
|
|
71
72
|
3. Register Fitbit App
|
|
@@ -85,7 +85,7 @@ def parse_arguments():
|
|
|
85
85
|
nargs="?",
|
|
86
86
|
const=(datetime.today().date(), None),
|
|
87
87
|
metavar="DATE[,DATE]|RELATIVE",
|
|
88
|
-
help="Show
|
|
88
|
+
help="Show Sleep Log by Date Range.",
|
|
89
89
|
)
|
|
90
90
|
group.add_argument(
|
|
91
91
|
"-o",
|
|
@@ -94,7 +94,7 @@ def parse_arguments():
|
|
|
94
94
|
nargs="?",
|
|
95
95
|
const=(datetime.today().date(), None),
|
|
96
96
|
metavar="DATE[,DATE]|RELATIVE",
|
|
97
|
-
help="Show SpO2
|
|
97
|
+
help="Show SpO2 Summary by Interval.",
|
|
98
98
|
)
|
|
99
99
|
group.add_argument(
|
|
100
100
|
"-e",
|
|
@@ -103,7 +103,7 @@ def parse_arguments():
|
|
|
103
103
|
nargs="?",
|
|
104
104
|
const=(datetime.today().date(), None),
|
|
105
105
|
metavar="DATE[,DATE]|RELATIVE",
|
|
106
|
-
help="Show Heart Rate Time Series
|
|
106
|
+
help="Show Heart Rate Time Series by Date Range.",
|
|
107
107
|
)
|
|
108
108
|
group.add_argument(
|
|
109
109
|
"-a",
|
|
@@ -112,7 +112,7 @@ def parse_arguments():
|
|
|
112
112
|
nargs="?",
|
|
113
113
|
const=(datetime.today().date(), None),
|
|
114
114
|
metavar="DATE[,DATE]|RELATIVE",
|
|
115
|
-
help="Show
|
|
115
|
+
help="Show AZM Time Series by Interval.",
|
|
116
116
|
)
|
|
117
117
|
group.add_argument(
|
|
118
118
|
"-b",
|
|
@@ -121,13 +121,19 @@ def parse_arguments():
|
|
|
121
121
|
nargs="?",
|
|
122
122
|
const=(datetime.today().date(), None),
|
|
123
123
|
metavar="DATE[,DATE]|RELATIVE",
|
|
124
|
-
help="Show Breathing Rate Summary
|
|
124
|
+
help="Show Breathing Rate Summary by Interval.",
|
|
125
125
|
)
|
|
126
126
|
group.add_argument(
|
|
127
127
|
"-u",
|
|
128
|
-
"--
|
|
128
|
+
"--user-profile",
|
|
129
129
|
action="store_true",
|
|
130
|
-
help="Show
|
|
130
|
+
help="Show Profile.",
|
|
131
|
+
)
|
|
132
|
+
group.add_argument(
|
|
133
|
+
"-d",
|
|
134
|
+
"--devices",
|
|
135
|
+
action="store_true",
|
|
136
|
+
help="Show Devices.",
|
|
131
137
|
)
|
|
132
138
|
|
|
133
139
|
parser.add_argument(
|
|
@@ -79,6 +79,13 @@ class FitbitAPI:
|
|
|
79
79
|
response = self.make_request("GET", url)
|
|
80
80
|
return response.json()
|
|
81
81
|
|
|
82
|
+
def get_devices(self):
|
|
83
|
+
"""Get Devices"""
|
|
84
|
+
|
|
85
|
+
url = "https://api.fitbit.com/1/user/-/devices.json"
|
|
86
|
+
response = self.make_request("GET", url)
|
|
87
|
+
return response.json()
|
|
88
|
+
|
|
82
89
|
def get_sleep_log(self, start_date, end_date=None):
|
|
83
90
|
"""Get Sleep Logs by Date Range and Date"""
|
|
84
91
|
|
|
@@ -142,3 +149,10 @@ class FitbitAPI:
|
|
|
142
149
|
url = f"https://api.fitbit.com/1/user/-/br/date/{date_range}/all.json"
|
|
143
150
|
response = self.make_request("GET", url)
|
|
144
151
|
return response.json()
|
|
152
|
+
|
|
153
|
+
def get_daily_activity_summary(self, start_date):
|
|
154
|
+
"""Get Daily Activity Summary"""
|
|
155
|
+
|
|
156
|
+
url = f"https://api.fitbit.com/1/user/-/activities/date/{start_date}.json"
|
|
157
|
+
response = self.make_request("GET", url)
|
|
158
|
+
return response.json()
|
|
@@ -164,3 +164,32 @@ def display_breathing_rate(breathing_rate_data):
|
|
|
164
164
|
)
|
|
165
165
|
|
|
166
166
|
CONSOLE.print(table)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
def display_devices(devices):
|
|
170
|
+
"""Devices list formatter"""
|
|
171
|
+
|
|
172
|
+
def format_mac(mac):
|
|
173
|
+
if mac == "N/A" or len(mac) % 2:
|
|
174
|
+
return mac
|
|
175
|
+
return ":".join(mac[i : i + 2] for i in range(0, len(mac), 2))
|
|
176
|
+
|
|
177
|
+
table = Table(title="Devices List :link:", show_header=True)
|
|
178
|
+
|
|
179
|
+
table.add_column("Battery Level :battery:")
|
|
180
|
+
table.add_column("Device Model :watch:")
|
|
181
|
+
table.add_column("Device Type :iphone:")
|
|
182
|
+
table.add_column("Last Sync Time :clock3:")
|
|
183
|
+
table.add_column("MAC Address :label:")
|
|
184
|
+
|
|
185
|
+
for device in devices:
|
|
186
|
+
mac_address = format_mac(str(device.get("mac", "N/A")))
|
|
187
|
+
table.add_row(
|
|
188
|
+
str(device.get("batteryLevel", "N/A")),
|
|
189
|
+
str(device.get("deviceVersion", "N/A")),
|
|
190
|
+
str(device.get("type", "N/A")),
|
|
191
|
+
str(device.get("lastSyncTime", "N/A")),
|
|
192
|
+
mac_address,
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
CONSOLE.print(table)
|
|
@@ -27,8 +27,10 @@ def main():
|
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
with fmt.CONSOLE.status("[bold green]Fetching data...") as _:
|
|
30
|
-
if args.
|
|
30
|
+
if args.user_profile:
|
|
31
31
|
fmt.display_user_profile(fitbit.get_user_profile())
|
|
32
|
+
if args.devices:
|
|
33
|
+
fmt.display_devices(fitbit.get_devices())
|
|
32
34
|
if args.sleep:
|
|
33
35
|
fmt.display_sleep(fitbit.get_sleep_log(*args.sleep))
|
|
34
36
|
if args.spo2:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fitbit-cli
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: Access your Fitbit data at your terminal.
|
|
5
5
|
Home-page: https://github.com/veerendra2/fitbit-cli
|
|
6
|
-
Download-URL: https://github.com/veerendra2/fitbit-cli/archive/1.
|
|
6
|
+
Download-URL: https://github.com/veerendra2/fitbit-cli/archive/1.4.0.tar.gz
|
|
7
7
|
Author: veerendra2
|
|
8
8
|
Author-email: vk.tyk23@simplelogin.com
|
|
9
9
|
License: MIT
|
|
@@ -16,8 +16,6 @@ Classifier: Natural Language :: English
|
|
|
16
16
|
Classifier: Operating System :: MacOS
|
|
17
17
|
Classifier: Operating System :: POSIX :: Linux
|
|
18
18
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
21
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
21
|
Classifier: Programming Language :: Python :: 3.9
|
|
@@ -27,8 +25,8 @@ Classifier: Topic :: Utilities
|
|
|
27
25
|
Requires-Python: >=3.9
|
|
28
26
|
Description-Content-Type: text/markdown
|
|
29
27
|
License-File: LICENSE
|
|
30
|
-
Requires-Dist: requests==2.32.
|
|
31
|
-
Requires-Dist: rich==14.
|
|
28
|
+
Requires-Dist: requests==2.32.4
|
|
29
|
+
Requires-Dist: rich==14.1.0
|
|
32
30
|
Dynamic: author
|
|
33
31
|
Dynamic: author-email
|
|
34
32
|
Dynamic: classifier
|
|
@@ -55,7 +53,7 @@ Dynamic: summary
|
|
|
55
53
|
Access your Fitbit data directly from your terminal 💻. View 💤 sleep logs, ❤️ heart rate, 🏋️♂️ activity levels, 🩸 SpO2, and more, all presented in a simple, easy-to-read table format!
|
|
56
54
|
|
|
57
55
|
<p align="center">
|
|
58
|
-
<img alt="Fitbit logo", width="
|
|
56
|
+
<img alt="Fitbit logo", width="350" src="https://raw.githubusercontent.com/veerendra2/fitbit-cli/refs/heads/main/assets/Fitbit_Logo_White_RGB.jpg">
|
|
59
57
|
</p>
|
|
60
58
|
|
|
61
59
|
[](https://asciinema.org/a/696114)
|
|
@@ -64,14 +62,16 @@ Access your Fitbit data directly from your terminal 💻. View 💤 sleep logs,
|
|
|
64
62
|
|
|
65
63
|
> Only `GET` APIs are supported!
|
|
66
64
|
|
|
67
|
-
| API
|
|
68
|
-
|
|
|
69
|
-
| [
|
|
70
|
-
| [
|
|
71
|
-
| [
|
|
72
|
-
| [
|
|
73
|
-
| [
|
|
74
|
-
| [
|
|
65
|
+
| API | Status |
|
|
66
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ |
|
|
67
|
+
| [Get Profile](https://dev.fitbit.com/build/reference/web-api/user/get-profile/) | ✅ |
|
|
68
|
+
| [Get Devices](https://dev.fitbit.com/build/reference/web-api/devices/get-devices/) | ✅ |
|
|
69
|
+
| [Get Sleep Log by Date Range](https://dev.fitbit.com/build/reference/web-api/sleep/get-sleep-log-by-date-range/) | ✅ |
|
|
70
|
+
| [Get SpO2 Summary by Interval](https://dev.fitbit.com/build/reference/web-api/spo2/get-spo2-summary-by-interval/) | ✅ |
|
|
71
|
+
| [Get Heart Rate Time Series by Date Range](https://dev.fitbit.com/build/reference/web-api/heartrate-timeseries/get-heartrate-timeseries-by-date-range/) | ✅ |
|
|
72
|
+
| [Get AZM Time Series by Interval](https://dev.fitbit.com/build/reference/web-api/active-zone-minutes-timeseries/get-azm-timeseries-by-interval/) | ✅ |
|
|
73
|
+
| [Get Breathing Rate Summary by Interval](https://dev.fitbit.com/build/reference/web-api/breathing-rate/get-br-summary-by-interval/) | ✅ |
|
|
74
|
+
| [Get Daily Activity Summary](https://dev.fitbit.com/build/reference/web-api/activity/get-daily-activity-summary/) | ⏳ |
|
|
75
75
|
|
|
76
76
|
## Usage Guide
|
|
77
77
|
|
|
@@ -84,9 +84,8 @@ python -m pip install fitbit-cli
|
|
|
84
84
|
2. See Help
|
|
85
85
|
|
|
86
86
|
```bash
|
|
87
|
-
fitbit-cli -h
|
|
88
|
-
usage: fitbit-cli [-h] [-i] [-s [DATE[,DATE]|RELATIVE]] [-o [DATE[,DATE]|RELATIVE]] [-e [DATE[,DATE]|RELATIVE]] [-a [DATE[,DATE]|RELATIVE]]
|
|
89
|
-
[-b [DATE[,DATE]|RELATIVE]] [-u] [-v]
|
|
87
|
+
$ fitbit-cli -h
|
|
88
|
+
usage: fitbit-cli [-h] [-i] [-s [DATE[,DATE]|RELATIVE]] [-o [DATE[,DATE]|RELATIVE]] [-e [DATE[,DATE]|RELATIVE]] [-a [DATE[,DATE]|RELATIVE]] [-b [DATE[,DATE]|RELATIVE]] [-u] [-d] [-v]
|
|
90
89
|
|
|
91
90
|
Fitbit CLI -- Access your Fitbit data at your terminal.
|
|
92
91
|
|
|
@@ -101,17 +100,17 @@ APIs:
|
|
|
101
100
|
If not provided, defaults to today's date.
|
|
102
101
|
|
|
103
102
|
-s, --sleep [DATE[,DATE]|RELATIVE]
|
|
104
|
-
Show
|
|
103
|
+
Show Sleep Log by Date Range.
|
|
105
104
|
-o, --spo2 [DATE[,DATE]|RELATIVE]
|
|
106
|
-
Show SpO2
|
|
105
|
+
Show SpO2 Summary by Interval.
|
|
107
106
|
-e, --heart [DATE[,DATE]|RELATIVE]
|
|
108
|
-
Show Heart Rate Time Series
|
|
107
|
+
Show Heart Rate Time Series by Date Range.
|
|
109
108
|
-a, --active-zone [DATE[,DATE]|RELATIVE]
|
|
110
|
-
Show
|
|
109
|
+
Show AZM Time Series by Interval.
|
|
111
110
|
-b, --breathing-rate [DATE[,DATE]|RELATIVE]
|
|
112
|
-
Show Breathing Rate Summary
|
|
113
|
-
-u, --
|
|
114
|
-
|
|
111
|
+
Show Breathing Rate Summary by Interval.
|
|
112
|
+
-u, --user-profile Show Profile.
|
|
113
|
+
-d, --devices Show Devices.
|
|
115
114
|
```
|
|
116
115
|
|
|
117
116
|
3. Register Fitbit App
|
|
@@ -39,8 +39,6 @@ setup(
|
|
|
39
39
|
"Operating System :: MacOS",
|
|
40
40
|
"Operating System :: POSIX :: Linux",
|
|
41
41
|
"Programming Language :: Python :: 3 :: Only",
|
|
42
|
-
"Programming Language :: Python :: 3.10",
|
|
43
|
-
"Programming Language :: Python :: 3.11",
|
|
44
42
|
"Programming Language :: Python :: 3.12",
|
|
45
43
|
"Programming Language :: Python :: 3.13",
|
|
46
44
|
"Programming Language :: Python :: 3.9",
|
|
@@ -49,8 +47,8 @@ setup(
|
|
|
49
47
|
"Topic :: Utilities",
|
|
50
48
|
],
|
|
51
49
|
install_requires=[
|
|
52
|
-
"requests==2.32.
|
|
53
|
-
"rich==14.
|
|
50
|
+
"requests==2.32.4",
|
|
51
|
+
"rich==14.1.0",
|
|
54
52
|
],
|
|
55
53
|
python_requires=">=3.9",
|
|
56
54
|
entry_points={"console_scripts": ["fitbit-cli = fitbit_cli.main:main"]},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|