Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylibrelinkup-0.2.0.tar.gz (14.4 kB view hashes)

Uploaded Source

Built Distribution

pylibrelinkup-0.2.0-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page