Experimental Medtronic CareLink Client in Python
Python library, which can be used for retrieving data from Medtronic CareLink of online CGM and insulin pump device data uploads (Guardian Connect, MiniMed 7xxG) inside and outside of US.
This is a port of the Java library CareLinkJavaClient
This is a developer version. Works for me. Extensive testing of different use cases is needed. Please report back if it works also or you.
-
Medtronic Guardian Connect CGM (to be confirmed)
-
Medtronic MiniMed 770G pump (to be confirmed)
- Login to CareLink and provide access token for CareLink API calls
- Some basic CareLink APIs: get user data, get user profile, get country settings, get last 24 hours, get recent data from CareLink Cloud
- Wrapper method for getting data uploaded by Medtronic BLE devices of the last 24 hours
- CareLink Client CLI
- CareLink MFA is not supported
- Notification messages are in English
-
CareLink account (with MFA NOT ENABLED)
- Guardian Connect CGM outside US: patient or care partner account
- Guardian Connect CGM inside US: not tested yet! (possibly a care partner account)
- 7xxG pump outside US: care partner account (same as for Medtronic CareLink Connect app)
- 7xxG pump inside US: care partner account (same as for Medtronic CareLink Connect app)
-
Runtime: Python3
-
External libraries used:
- Python Requests
git clone https://github.com/ondrej1024/carelink-python-client.git
cd carelink-python-client
import carelink_client
client = carelink_client.CareLinkClient("carelink_username", "carelink_password", "carelink_country_code")
if client.login():
recentData = client.getRecentData()
python carelink_client_cli.py -u carelink_username -p carelink_password -c carelink_country_code -d
python carelink_client_cli.py -h
This project is based on other peoples work which I want to thank for their efforts.
- Bence Szász for the original Java implementation
- Ben West for providing valuable details on the Carelink API and workflow
This project is intended for educational and informational purposes only. It relies on a series of fragile components and assumptions, any of which may break at any time. It is not FDA approved and should not be used to make medical decisions. It is neither affiliated with nor endorsed by Medtronic, and may violate their Terms of Service. Use of this code is without warranty or formal support of any kind.