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
PyLibreLinkUp provides three methods to retrieve patient data: current, graph, and logbook.
- The
currentmethod retrieves the most recent glucose measurement reported by the LLU api for a patient. - The
graphmethod retrieves the glucose measurements for the previous 12 hours which are used to display the recent history graph in the LLU app. - The
logbookmethod retrieves the glucose event data for approximately the last two weeks.
All three methods accept a patient_identifier parameter in the form of a UUID, str, or Patient object.
Note: The read method also exists as a way to retrieve both recent and latest patient data, but it is deprecated and will be removed in a future release. Use the graph method for retrieving graph data and latest to access the most recent glucose measurement.
Current Glucose:
latest_glucose = client.latest(patient_identifier=patient_list[0])
print(latest_glucose)
Graph Data:
graph_data = client.graph(patient_identifier=patient_list[0])
print(graph_data)
Logbook Data:
logbook_data = client.logbook(patient_identifier=patient_list[0])
print(logbook_data)
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]
print(f"latest: {client.latest(patient_identifier=patient)}")
graph_data = client.graph(patient_identifier=patient)
print(f"graph data ({len(graph_data)} measurements):")
for measurement in graph_data:
print(f"{measurement.value} {measurement.timestamp} {measurement.factory_timestamp}")
logbook_data = client.logbook(patient_identifier=patient)
print(f"logbook data: ({len(logbook_data)} entries)")
for measurement in logbook_data:
print(f"{measurement.value} {measurement.timestamp} {measurement.factory_timestamp}")
For full documentation, please refer to the API documentation.
Release files for pylibrelinkup 0.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pylibrelinkup-0.11.0.tar.gz | 28.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pylibrelinkup-0.11.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.2 kB
Release files / pylibrelinkup-0.11.0.tar.gz
| Download URL | pylibrelinkup-0.11.0.tar.gz |
|---|---|
| Size | 28.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e922c3f84b58a44108f3652ce43bb35b928f12e37b3f2b71f793ea8b3a90f34b
|
|
BLAKE2b-256 checksum How to use checksums |
52bf6ff1592cf4675c1aa84a1360c86fe85cce218f45539e9b49a9b9c3a03bcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logRelease files / pylibrelinkup-0.11.0-py3-none-any.whl
| Download URL | pylibrelinkup-0.11.0-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66e8d5f07a97d3e0042252129ae0d90f0f5b13da6c9b2eb76d51d3988b8f719e
|
|
BLAKE2b-256 checksum How to use checksums |
6e3b686facb8c96b52c7d923ff0f3d6c91398ca3693c4573a483d2b9d528e49f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency log