A client for the Abbott LibreLinkUp API
Project description
pylibrelinkup
pylibrelinkup
is a Python client for the LibreLinkUp API, which allows you to interact with the LibreLinkUp service to retrieve glucose data and other related information. This project is a Python implementation inspired by the libre-link-up-api-client project.
Installation
To install pylibrelinkup
, you can use pip
:
pip install pylibrelinkup
Usage
Initialization
First, you need to import the necessary modules, initialize the client, and authenticate with your LibreLinkUp credentials:
from pylibrelinkup.client import LibreLinkUpClient
client = LibreLinkUpClient(username='your_username', password='your_password')
client.authenticate()
Getting Patient List
You can fetch the patient list using the get_patient_list
method:
patient_list = client.get_patient_list()
print(patient_list)
Getting Patient data
Retrieve patient data using the read
method:
patient = client.get_patient_list()[0]
patient_data = client.read(patient_identifier=patient.patient_id)
The read
method accepts a patient_identifier
parameter in the form of a UUID
, str
, or Patient
object.
Get the latest glucose data:
latest_glucose = patient_data.current
print(latest_glucose)
Get the historical glucose data:
historical_glucose = patient_data.history
print(historical_glucose)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pylibrelinkup-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efaff06536cee2875d6c59bf9e9f8c47169b6497744142c7b9bdf34ad8a89152 |
|
MD5 | f526f52607dbd42e45a562418255f99a |
|
BLAKE2b-256 | 992303ce889cdfe24435c329589fb562f9207b3266463554ff065f9497c85521 |