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 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


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.5.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

pylibrelinkup-0.5.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file pylibrelinkup-0.5.0.tar.gz.

File metadata

  • Download URL: pylibrelinkup-0.5.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pylibrelinkup-0.5.0.tar.gz
Algorithm Hash digest
SHA256 e75c412148a0d46e8b1db97a995da61acdaaaec27978679e464d1a58ac07131e
MD5 f57a2eb03c5af17fc4039459a69f0bfd
BLAKE2b-256 223ee8af22db05227a5b46088d06584c24f8a88976107a67721bcca280b68c5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylibrelinkup-0.5.0.tar.gz:

Publisher: python-publish.yml on robberwick/pylibrelinkup

Attestations:

File details

Details for the file pylibrelinkup-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pylibrelinkup-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c37e92827b0ab9e208aee5629946ba757658466535618b15b17193271bd8e702
MD5 9a10f641b774470bb5dde379e949fc41
BLAKE2b-256 e917b4df4a76a145112f105dbe07af5e904f73c03bf741d4afd2001535028cbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylibrelinkup-0.5.0-py3-none-any.whl:

Publisher: python-publish.yml on robberwick/pylibrelinkup

Attestations:

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