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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e75c412148a0d46e8b1db97a995da61acdaaaec27978679e464d1a58ac07131e |
|
MD5 | f57a2eb03c5af17fc4039459a69f0bfd |
|
BLAKE2b-256 | 223ee8af22db05227a5b46088d06584c24f8a88976107a67721bcca280b68c5b |
Provenance
The following attestation bundles were made for pylibrelinkup-0.5.0.tar.gz
:
Publisher:
python-publish.yml
on robberwick/pylibrelinkup
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pylibrelinkup-0.5.0.tar.gz
- Subject digest:
e75c412148a0d46e8b1db97a995da61acdaaaec27978679e464d1a58ac07131e
- Sigstore transparency entry: 146262959
- Sigstore integration time:
- Predicate type:
File details
Details for the file pylibrelinkup-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: pylibrelinkup-0.5.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c37e92827b0ab9e208aee5629946ba757658466535618b15b17193271bd8e702 |
|
MD5 | 9a10f641b774470bb5dde379e949fc41 |
|
BLAKE2b-256 | e917b4df4a76a145112f105dbe07af5e904f73c03bf741d4afd2001535028cbd |
Provenance
The following attestation bundles were made for pylibrelinkup-0.5.0-py3-none-any.whl
:
Publisher:
python-publish.yml
on robberwick/pylibrelinkup
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
pylibrelinkup-0.5.0-py3-none-any.whl
- Subject digest:
c37e92827b0ab9e208aee5629946ba757658466535618b15b17193271bd8e702
- Sigstore transparency entry: 146262960
- Sigstore integration time:
- Predicate type: