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

Uploaded Source

Built Distribution

pylibrelinkup-0.4.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pylibrelinkup-0.4.0.tar.gz
Algorithm Hash digest
SHA256 ecfd89a482f1238f21d663af4b9f797dc80e93f4ccf3a1da7bbe8bba77cd7fef
MD5 f7462f77c5bcbbd90071acc5f7bec8d6
BLAKE2b-256 73469bc27359a628e020d5453d23bb0f8b3591a3843e8aab96e09dea6ad9f142

See more details on using hashes here.

Provenance

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

Publisher: python-publish.yml on robberwick/pylibrelinkup

Attestations:

File details

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

File metadata

File hashes

Hashes for pylibrelinkup-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d545a49219330f969d4b9aaa6c2f8d22ed249894eccdd0b80aeb899751a0e658
MD5 9f4f660a3c2ea31711231afcf9ef15d8
BLAKE2b-256 08f9929dbf6ad4fcb3e31c93d50b872d7b6076398a62d7676c9920dc6b2f818a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylibrelinkup-0.4.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