#api #value #dexcom #t1d #diabetes #dexcom-client

dexrs

Rust library for fetching Dexcom glucose values

2 releases

0.1.1 Apr 23, 2025
0.1.0 Apr 9, 2025

#528 in Web programming

Download history 119/week @ 2025-04-09 7/week @ 2025-04-16 127/week @ 2025-04-23 10/week @ 2025-04-30

263 downloads per month

MIT license

19KB
276 lines

dexrs 🩸🍭

Rust library for interacting with the Dexcom Share API

[!WARNING] dexrs is most definitely still a work in progress. If you notice a bug, please open an issue or PR.

Installation

dexrs can be installed through Cargo:

cargo add dexrs

Usage

You can use dexrs by implementing the code below. See /examples for more examples.

use dexrs::dexcom::client::DexcomClient;
use std::env;

pub fn main() {
    let client = DexcomClient::new(env::var("DEXCOM_USERNAME").unwrap(), env::var("DEXCOM_PASSWORD").unwrap(), false).unwrap();

    let values = client.get_glucose_readings(None, None).unwrap();
    for v in values {
        println!("MG/DL: {}, Trend: {}, Time: {}", v.mg_dl, v.trend.arrow, v.datetime);
    }
}

Contributing

If you wish to contribute improvements, bug fixes, or even new features, feel free to open a PR. Everyone is welcome to contribute.

License

Everything is licensed under MIT. See LICENSE for more.

Dependencies

~8–21MB
~283K SLoC