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 import PyLibreLinkUp
client = PyLibreLinkUp(email='your_username', password='your_password')
client.authenticate()
Getting Patient List
You can fetch the list of patients using the get_patients
method:
patient_list = client.get_patients()
print(patient_list)
Getting Patient data
Retrieve patient data using the read
method:
patient = 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)
full example:
from pylibrelinkup import PyLibreLinkUp
client = PyLibreLinkUp(email='your_username', password='your_password')
client.authenticate()
patient_list = client.get_patients()
print(patient_list)
patient = patient_list[0]
patient_data = client.read(patient_identifier=patient.patient_id)
print(f"Current glucose: {patient_data.current}")
print(f"Historical glucose: {patient_data.history}")
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
File details
Details for the file pylibrelinkup-0.3.0.tar.gz
.
File metadata
- Download URL: pylibrelinkup-0.3.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b98b72862b44de99f74e4149b58c2d200b0fc7ae59b11b01a21efa8b8cbc941c |
|
MD5 | 9111865dc9e32de5869cffe538cc6917 |
|
BLAKE2b-256 | a075739ef5125793a94036ccb8c3f25f3d9c1499e805b396ab48bd0df685041d |
File details
Details for the file pylibrelinkup-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: pylibrelinkup-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d49ed23058dd17da623cf54e7ec0c4f8c0f3f1c1ba150259f4af8eb577dce78c |
|
MD5 | ec64449bcfea67cb6414bbfe5751ec65 |
|
BLAKE2b-256 | bb91c8672f773123028eed9e5e11761af1e1784b03bad2121bd8654ae8715b62 |