Name | pylibrelinkup JSON |
Version |
0.6.3
JSON |
| download |
home_page | None |
Summary | A client for the Abbott LibreLinkUp API |
upload_time | 2024-12-09 21:51:12 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | MIT License Copyright (c) 2024 Rob Berwick Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
librelink
librelinkup
abbott
diabetes
glucose
api
client
health
medical
blood-sugar
continuous-glucose-monitoring
cgm
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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](https://github.com/DiaKEM/libre-link-up-api-client) project.
## Installation
To install `pylibrelinkup`, you can use `pip`:
```bash
pip install pylibrelinkup
```
## Usage
### Initialization
First, you need to import the necessary modules, initialize the client, and authenticate with your LibreLinkUp credentials:
```python
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:
```python
patient_list = client.get_patients()
print(patient_list)
```
### Getting Patient data
PyLibreLinkUp provides three methods to retrieve patient data: `current`, `graph`, and `logbook`.
- The `current` method retrieves the most recent glucose measurement reported by the LLU api for a patient.
- The `graph` method retrieves the glucose measurements for the previous 12 hours which are used to display the recent history graph in the LLU app.
- The `logbook` method 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:
```python
latest_glucose = client.latest(patient_identifier=patient_list[0])
print(latest_glucose)
```
#### Graph Data:
```python
graph_data = client.graph(patient_identifier=patient_list[0])
print(graph_data)
```
#### Logbook Data:
```python
logbook_data = client.logbook(patient_identifier=patient_list[0])
print(logbook_data)
```
full example:
```python
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](https://pylibrelinkup.readthedocs.io/en/latest/).
Raw data
{
"_id": null,
"home_page": null,
"name": "pylibrelinkup",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "librelink, librelinkup, abbott, diabetes, glucose, api, client, health, medical, blood-sugar, continuous-glucose-monitoring, cgm",
"author": null,
"author_email": "Rob Berwick <rob.berwick@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/fa/da/5c163439598072f730f26d2a3e04fa75658a18dc95f86ae0192067933cea/pylibrelinkup-0.6.3.tar.gz",
"platform": null,
"description": "# pylibrelinkup\n\n`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](https://github.com/DiaKEM/libre-link-up-api-client) project.\n\n## Installation\n\nTo install `pylibrelinkup`, you can use `pip`:\n\n```bash\npip install pylibrelinkup\n```\n\n## Usage\n\n### Initialization\n\nFirst, you need to import the necessary modules, initialize the client, and authenticate with your LibreLinkUp credentials:\n\n```python\nfrom pylibrelinkup import PyLibreLinkUp\n\nclient = PyLibreLinkUp(email='your_username', password='your_password')\nclient.authenticate()\n```\n\n### Getting Patient List\n\nYou can fetch the list of patients using the `get_patients` method:\n\n```python\npatient_list = client.get_patients()\nprint(patient_list)\n```\n\n### Getting Patient data\n\nPyLibreLinkUp provides three methods to retrieve patient data: `current`, `graph`, and `logbook`. \n\n- The `current` method retrieves the most recent glucose measurement reported by the LLU api for a patient.\n- The `graph` method retrieves the glucose measurements for the previous 12 hours which are used to display the recent history graph in the LLU app.\n- The `logbook` method retrieves the glucose event data for approximately the last two weeks.\n\nAll three methods accept a `patient_identifier` parameter in the form of a `UUID`, `str`, or `Patient` object.\n\n**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.\n\n#### Current Glucose:\n\n```python\nlatest_glucose = client.latest(patient_identifier=patient_list[0])\nprint(latest_glucose)\n```\n\n#### Graph Data:\n\n```python\ngraph_data = client.graph(patient_identifier=patient_list[0])\nprint(graph_data)\n```\n\n\n#### Logbook Data:\n\n```python\nlogbook_data = client.logbook(patient_identifier=patient_list[0])\nprint(logbook_data)\n```\n\nfull example:\n\n```python\nfrom pylibrelinkup import PyLibreLinkUp\n\nclient = PyLibreLinkUp(email='your_username', password='your_password')\nclient.authenticate()\npatient_list = client.get_patients()\nprint(patient_list)\npatient = patient_list[0]\nprint(f\"latest: {client.latest(patient_identifier=patient)}\")\ngraph_data = client.graph(patient_identifier=patient)\nprint(f\"graph data ({len(graph_data)} measurements):\")\nfor measurement in graph_data:\n print(f\"{measurement.value} {measurement.timestamp} {measurement.factory_timestamp}\")\nlogbook_data = client.logbook(patient_identifier=patient)\nprint(f\"logbook data: ({len(logbook_data)} entries)\")\nfor measurement in logbook_data:\n print(f\"{measurement.value} {measurement.timestamp} {measurement.factory_timestamp}\")\n```\n\nFor full documentation, please refer to the [API documentation](https://pylibrelinkup.readthedocs.io/en/latest/).\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Rob Berwick Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "A client for the Abbott LibreLinkUp API",
"version": "0.6.3",
"project_urls": {
"Documentation": "https://pylibrelinkup.readthedocs.io/",
"Homepage": "https://github.com/robberwick/pylibrelinkup",
"Issues": "https://github.com/robberwick/pylibrelinkup/issues"
},
"split_keywords": [
"librelink",
" librelinkup",
" abbott",
" diabetes",
" glucose",
" api",
" client",
" health",
" medical",
" blood-sugar",
" continuous-glucose-monitoring",
" cgm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "317429def475b6019fe6bf96be976ecb6f8da9690d139618c1e8c1f771348c33",
"md5": "5bda1ddaa5ad64f6e5940e839c124c10",
"sha256": "c4c798153412b58dcea4c8c9db61e453017272137f33049004247376e3bf06fa"
},
"downloads": -1,
"filename": "pylibrelinkup-0.6.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5bda1ddaa5ad64f6e5940e839c124c10",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 12534,
"upload_time": "2024-12-09T21:51:10",
"upload_time_iso_8601": "2024-12-09T21:51:10.929281Z",
"url": "https://files.pythonhosted.org/packages/31/74/29def475b6019fe6bf96be976ecb6f8da9690d139618c1e8c1f771348c33/pylibrelinkup-0.6.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fada5c163439598072f730f26d2a3e04fa75658a18dc95f86ae0192067933cea",
"md5": "f5937367626ce1341e3bfdbd684b7675",
"sha256": "592857adf93da16f24d834ab592a67285ad523b3e32e8ab6f8cb4888a461857a"
},
"downloads": -1,
"filename": "pylibrelinkup-0.6.3.tar.gz",
"has_sig": false,
"md5_digest": "f5937367626ce1341e3bfdbd684b7675",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 23371,
"upload_time": "2024-12-09T21:51:12",
"upload_time_iso_8601": "2024-12-09T21:51:12.800461Z",
"url": "https://files.pythonhosted.org/packages/fa/da/5c163439598072f730f26d2a3e04fa75658a18dc95f86ae0192067933cea/pylibrelinkup-0.6.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-09 21:51:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "robberwick",
"github_project": "pylibrelinkup",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pylibrelinkup"
}