pydexcom.const
Constants used in pydexcom
.
1"""Constants used in `pydexcom`.""" 2 3from typing import Dict, List 4 5DEXCOM_APPLICATION_ID: str = "d89443d2-327c-4a6f-89e5-496bbb0317db" 6"""Dexcom application ID.""" 7 8DEXCOM_BASE_URL: str = "https://share2.dexcom.com/ShareWebServices/Services" 9"""Dexcom Share API base url for US.""" 10 11DEXCOM_BASE_URL_OUS: str = "https://shareous1.dexcom.com/ShareWebServices/Services" 12"""Dexcom Share API base url for outside of the US.""" 13 14DEXCOM_LOGIN_ID_ENDPOINT: str = "General/LoginPublisherAccountById" 15"""Dexcom Share API endpoint used to retrieve account ID.""" 16 17DEXCOM_AUTHENTICATE_ENDPOINT: str = "General/AuthenticatePublisherAccount" 18"""Dexcom Share API endpoint used to retrieve session ID.""" 19 20DEXCOM_GLUCOSE_READINGS_ENDPOINT: str = "Publisher/ReadPublisherLatestGlucoseValues" 21"""Dexcom Share API endpoint used to retrieve glucose values.""" 22 23DEFAULT_UUID: str = "00000000-0000-0000-0000-000000000000" 24"""UUID consisting of all zeros, likely error if returned by Dexcom Share API.""" 25 26DEXCOM_TREND_DIRECTIONS: Dict[str, int] = { 27 "None": 0, # unconfirmed 28 "DoubleUp": 1, 29 "SingleUp": 2, 30 "FortyFiveUp": 3, 31 "Flat": 4, 32 "FortyFiveDown": 5, 33 "SingleDown": 6, 34 "DoubleDown": 7, 35 "NotComputable": 8, # unconfirmed 36 "RateOutOfRange": 9, # unconfirmed 37} 38"""Trend directions returned by the Dexcom Share API mapped to `int`.""" 39 40TREND_DESCRIPTIONS: List[str] = [ 41 "", 42 "rising quickly", 43 "rising", 44 "rising slightly", 45 "steady", 46 "falling slightly", 47 "falling", 48 "falling quickly", 49 "unable to determine trend", 50 "trend unavailable", 51] 52"""Trend descriptions ordered identically to `DEXCOM_TREND_DIRECTIONS`.""" 53 54TREND_ARROWS: List[str] = ["", "↑↑", "↑", "↗", "→", "↘", "↓", "↓↓", "?", "-"] 55"""Trend arrows ordered identically to `DEXCOM_TREND_DIRECTIONS`.""" 56 57MAX_MINUTES: int = 1440 58"""Maximum minutes to use when retrieving glucose values (1 day).""" 59 60MAX_MAX_COUNT: int = 288 61"""Maximum count to use when retrieving glucose values (1 reading per 5 minutes).""" 62 63MMOL_L_CONVERSION_FACTOR: float = 0.0555 64"""Conversion factor between mg/dL and mmol/L."""
DEXCOM_APPLICATION_ID: str =
'd89443d2-327c-4a6f-89e5-496bbb0317db'
Dexcom application ID.
DEXCOM_BASE_URL: str =
'https://share2.dexcom.com/ShareWebServices/Services'
Dexcom Share API base url for US.
DEXCOM_BASE_URL_OUS: str =
'https://shareous1.dexcom.com/ShareWebServices/Services'
Dexcom Share API base url for outside of the US.
DEXCOM_LOGIN_ID_ENDPOINT: str =
'General/LoginPublisherAccountById'
Dexcom Share API endpoint used to retrieve account ID.
DEXCOM_AUTHENTICATE_ENDPOINT: str =
'General/AuthenticatePublisherAccount'
Dexcom Share API endpoint used to retrieve session ID.
DEXCOM_GLUCOSE_READINGS_ENDPOINT: str =
'Publisher/ReadPublisherLatestGlucoseValues'
Dexcom Share API endpoint used to retrieve glucose values.
DEFAULT_UUID: str =
'00000000-0000-0000-0000-000000000000'
UUID consisting of all zeros, likely error if returned by Dexcom Share API.
DEXCOM_TREND_DIRECTIONS: Dict[str, int] =
{'None': 0, 'DoubleUp': 1, 'SingleUp': 2, 'FortyFiveUp': 3, 'Flat': 4, 'FortyFiveDown': 5, 'SingleDown': 6, 'DoubleDown': 7, 'NotComputable': 8, 'RateOutOfRange': 9}
Trend directions returned by the Dexcom Share API mapped to int
.
TREND_DESCRIPTIONS: List[str] =
['', 'rising quickly', 'rising', 'rising slightly', 'steady', 'falling slightly', 'falling', 'falling quickly', 'unable to determine trend', 'trend unavailable']
Trend descriptions ordered identically to DEXCOM_TREND_DIRECTIONS
.
TREND_ARROWS: List[str] =
['', '↑↑', '↑', '↗', '→', '↘', '↓', '↓↓', '?', '-']
Trend arrows ordered identically to DEXCOM_TREND_DIRECTIONS
.
MAX_MINUTES: int =
1440
Maximum minutes to use when retrieving glucose values (1 day).
MAX_MAX_COUNT: int =
288
Maximum count to use when retrieving glucose values (1 reading per 5 minutes).
MMOL_L_CONVERSION_FACTOR: float =
0.0555
Conversion factor between mg/dL and mmol/L.