tconnectsync 2.2.2__tar.gz → 2.2.4__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.
- {tconnectsync-2.2.2/tconnectsync.egg-info → tconnectsync-2.2.4}/PKG-INFO +3 -2
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/setup.cfg +1 -1
- tconnectsync-2.2.4/tconnectsync/__main__.py +4 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/eventparser/build_events.py +18 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/eventparser/events.py +693 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/eventparser/raw_event.py +8 -1
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/secret.py +2 -2
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/choose_device.py +14 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/process.py +5 -3
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/process_device_status.py +1 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4/tconnectsync.egg-info}/PKG-INFO +3 -2
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync.egg-info/SOURCES.txt +2 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/LICENSE.md +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/README.md +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/pyproject.toml +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/setup.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/__init__.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/api/__init__.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/api/android.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/api/common.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/api/controliq.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/api/tandemsource.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/api/webui.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/api/ws2.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/autoupdate.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/check.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/domain/__init__.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/domain/bolus.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/domain/device_settings.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/domain/tandemsource/__init__.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/domain/tandemsource/event_class.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/domain/tandemsource/pump_settings.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/domain/therapy_event.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/domain/utility.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/eventparser/__init__.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/eventparser/generic.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/eventparser/static_dicts.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/eventparser/transforms.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/eventparser/utils.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/features.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/nightscout.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/parser/__init__.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/parser/ciq_therapy_events.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/parser/nightscout.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/parser/tconnect.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/process.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/__init__.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/basal.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/bolus.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/cgm.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/iob.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/profile.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/pump_events.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/__init__.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/autoupdate.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/cli_helpers.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/helpers.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/heroku_helpers.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/process_alarm.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/process_basal.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/process_basal_resume.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/process_basal_suspension.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/process_bolus.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/process_cartridge.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/process_cgm_alert.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/process_cgm_reading.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/process_cgm_start_join_stop.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/process_user_mode.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/sync/tandemsource/update_profiles.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/util/__init__.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/util/cli.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync/util/constants.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync.egg-info/dependency_links.txt +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync.egg-info/entry_points.txt +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync.egg-info/requires.txt +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tconnectsync.egg-info/top_level.txt +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tests/test_autoupdate.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tests/test_process.py +0 -0
- {tconnectsync-2.2.2 → tconnectsync-2.2.4}/tests/test_secret.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: tconnectsync
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.4
|
|
4
4
|
Summary: Syncs Tandem Source (formerly t:connect) insulin pump data to Nightscout for the t:slim X2
|
|
5
5
|
Home-page: https://github.com/jwoglom/tconnectsync
|
|
6
6
|
Author: James Woglom
|
|
@@ -27,6 +27,7 @@ Requires-Dist: cryptography
|
|
|
27
27
|
Requires-Dist: dataclasses-json
|
|
28
28
|
Requires-Dist: cffi
|
|
29
29
|
Requires-Dist: typing-extensions
|
|
30
|
+
Dynamic: license-file
|
|
30
31
|
|
|
31
32
|
# tconnectsync
|
|
32
33
|
|
|
@@ -68,6 +68,15 @@ class {name}(BaseEvent):
|
|
|
68
68
|
def eventId(self):
|
|
69
69
|
return self.ID
|
|
70
70
|
|
|
71
|
+
def todict(self):
|
|
72
|
+
return dict(
|
|
73
|
+
id=self.ID,
|
|
74
|
+
name=self.NAME,
|
|
75
|
+
seqNum=self.seqNum,
|
|
76
|
+
eventTimestamp=str(self.eventTimestamp),
|
|
77
|
+
{fields_dict}
|
|
78
|
+
)
|
|
79
|
+
|
|
71
80
|
'''
|
|
72
81
|
|
|
73
82
|
def firstLower(text):
|
|
@@ -97,6 +106,14 @@ def build_fields(event_def):
|
|
|
97
106
|
return '\n'.join([f'{" "*4}{f}' for f in ret])
|
|
98
107
|
|
|
99
108
|
|
|
109
|
+
def build_fields_dict(event_def):
|
|
110
|
+
ret = []
|
|
111
|
+
for name, field in event_def["data"].items():
|
|
112
|
+
suffix = 'Raw' if "transform" in field and name[-3:] != 'Raw' else ''
|
|
113
|
+
f = f'{fieldNameFormat(name)}{suffix}=self.{fieldNameFormat(name)}{suffix},'
|
|
114
|
+
ret.append(f)
|
|
115
|
+
return '\n'.join([f'{" "*12}{f}' for f in ret])
|
|
116
|
+
|
|
100
117
|
|
|
101
118
|
def build_decode(event_def):
|
|
102
119
|
p1s = []
|
|
@@ -134,6 +151,7 @@ def build_event(event_id, event_def):
|
|
|
134
151
|
return TEMPLATE.format(
|
|
135
152
|
name = eventNameFormat(event_def["name"]),
|
|
136
153
|
fields = build_fields(event_def),
|
|
154
|
+
fields_dict = build_fields_dict(event_def),
|
|
137
155
|
build_p1 = build_decode(event_def)[0],
|
|
138
156
|
build_p2 = build_decode(event_def)[1],
|
|
139
157
|
transform_funcs = build_transform_funcs(event_def),
|