PyLibreLinkUp

This is the main interface for the PyLibreLinkUp package, where you can authenticate and request data from the LibreLinkUp API.

In order to authenticate, you will need to sign up for an account at https://www.librelinkup.com/ and use your email and password to authenticate.

class pylibrelinkup.PyLibreLinkUp(email, password, api_url=APIUrl.US)[source]

Bases: object

PyLibreLinkUp class to request data from the LibreLinkUp API.

__init__(email, password, api_url=APIUrl.US)[source]

Constructor for the PyLibreLinkUp class.

Parameters:
  • email (str) – The email address for the LibreLinkUp account.

  • password (str) – The password for the LibreLinkUp account.

  • api_url (APIUrl) – The regional API URL to use. Defaults to US.

Returns:

None

authenticate()[source]

Authenticate with the LibreLinkUp API

Return type:

None

get_patients()[source]

Requests and returns patient data

Returns:

A list of patients.

Return type:

list[Patient]

graph(patient_identifier)[source]

Requests and returns glucose measurements used to display graph data. Returns approximately the last 12 hours of data.

Parameters:

patient_identifier (UUID | str | Patient) – PatientIdentifier: The identifier of the patient.

Returns:

A list of glucose measurements.

Return type:

list[GlucoseMeasurement]

latest(patient_identifier)[source]

Requests and returns the most recent glucose measurement

Parameters:

patient_identifier (UUID | str | Patient) – PatientIdentifier: The identifier of the patient.

Returns:

The most recent glucose measurement.

Return type:

GlucoseMeasurementWithTrend

logbook(patient_identifier)[source]

Requests and returns patient logbook data, containing the measurements associated with glucose events for approximately the last 14 days.

Parameters:

patient_identifier (UUID | str | Patient) – PatientIdentifier: The identifier of the patient.

Returns:

A list of glucose measurements.

Return type:

list[GlucoseMeasurement]

read(patient_identifier)[source]

Deprecated since version 0.6.0: The read method is deprecated. Instead, please use the graph method for retrieving graph data,” “and latest to access the most recently reported glucose measurement

Requests and returns patient data

Parameters:

patient_identifier (UUID | str | Patient) – PatientIdentifier : The identifier of the patient.

Returns:

The patient data.

Return type:

GraphResponse

account_id_hash: str | None