Convert blood glucose levels between mmol/l and mg/dl.
Project description
A blood sugar conversion tool
Python 3 utility for converting plasma glucose (“blood sugar”) units using argument parsing.
Convert:
milligram per decileter to millimole per liter (mg/dl to mmol/l)
millimole per liter to milligram per decileter (mmol/l to mg/dl)
Output:
a table of the conversion, e.g:
mg/dl |
mmol/l |
|---|---|
70.0000 |
3.8850 |
71.0000 |
3.9405 |
72.0000 |
3.9960 |
73.0000 |
4.0515 |
74.0000 |
4.1070 |
a csv of the conversion, e.g.:
mg/dl,mmol/l 70.0,3.885 71.0,3.9405 72.0,3.996 73.0,4.0515 74.0,4.107
Requirements
None.
Usage
Synopsis:
[-h] (--mg-to-mmol MG_TO_MMOL [MG_TO_MMOL ...] | --mmol-to-mg MMOL_TO_MG [MMOL_TO_MG ...])
[--csv FILE]
Examples
Single conversion:
python3 gluctool.py --mmol-to-mg 4.0515
Multiple conversions:
(spaced arguments)
python3 gluctool.py --mg-to-mmol 7.5 8.5 9.5 10
(brace expanson)
python3 gluctool.py --mg-to-mmol 7{0..9}
Export to csv:
python3 gluctool.py --mg-to-mmol 7.5 8.5 9.5 10 --csv filename
Change Log
License
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gluctool-0.1.0.tar.gz.
File metadata
- Download URL: gluctool-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6107061d01341e26bef0a1b25612b168280e895340da90b5f12ca034090a7163
|
|
| MD5 |
31546c84e2071e0f47ab34861f3817a1
|
|
| BLAKE2b-256 |
d0f9407ab2a9de65d53f963b414e239dc01e3bace27e70a8c3dafe2e2519a587
|
File details
Details for the file gluctool-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gluctool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a531a8c88ef23a7f9fa6ac02a1f045d552cf196559bbfae23373bf410e77ca17
|
|
| MD5 |
514153bbb2bd4012f865e287dde5a375
|
|
| BLAKE2b-256 |
366f422e44e441c32a301fdce11b2960a0c85b0f62cc94096c68adf632c84e12
|