Skip to main content

A time-series forecasting extension for pydexcom using Google's TimesFM

Project description

A time-series forecasting extension for pydexcom using Google's TimesFM. Used to predict immediate, short term blood glucose readings.

All modelling and forecasting is performed locally on your device. The only external connections made are with:

  • Dexcom Share API: fetching CGM readings following the pydexcom approach.
  • HuggingFace: one-time download of the forecasting model weights on the first run.

Quick Start

  1. Ensure that you have installed the pydexcom package and enabled the Share service within your Dexcom G7 / G6 / G5 / G4.

pip install pydexcom

  1. Initialise pydexcom with your Dexcom credentials (below shows the simplist route, refere to pydexcom for further instruction).
>>> from pydexcom import Dexcom
>>> dexcom = Dexcom(username="username", password="password")
  1. Generate a prediction.
>>> from forecose import DexcomForecast
>>> forecaster = DexcomForecast.from_dexcom( 
        dexcom=dexcom,      # pull recent readings from your active 'Dexcom' session
        context_len=288,    # uses prior day's readings as context
        horizon=12          # predicts the next hour
    )
>>> predictions = forecaster.forecast()
>>> print(predictions.head())
                         timestamp  predicted_glucose       q10       q25       q50       q75       q90
0 2026-06-25 11:01:19.199000+01:00           8.243370  8.244899  8.125346  8.214749  8.266071  8.309934
1 2026-06-25 11:06:19.199000+01:00           8.050682  8.073329  7.738788  8.018662  8.208736  8.303193
2 2026-06-25 11:11:19.199000+01:00           7.897943  7.879324  7.332723  7.783697  8.082028  8.256586
3 2026-06-25 11:16:19.199000+01:00           7.767045  7.738261  6.965607  7.621467  8.026337  8.236394
4 2026-06-25 11:21:19.199000+01:00           7.615633  7.667328  6.668064  7.442780  7.972524  8.216294

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

forecose-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

forecose-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file forecose-0.1.0.tar.gz.

File metadata

  • Download URL: forecose-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.0 {"ci":null,"cpu":"AMD64","implementation":{"name":"CPython","version":"3.14.3"},"installer":{"name":"hatch","version":"1.17.0"},"openssl_version":"OpenSSL 3.0.18 30 Sep 2025","python":"3.14.3","system":{"name":"Windows","release":"11"}} HTTPX2/2.4.0

File hashes

Hashes for forecose-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a999e4ffb7b522d23e98f608ec4ef3c8cd25ee9a03c2a85716508f51f8d66e21
MD5 4e4b40bc2ab6a84081cbf0323f1fc050
BLAKE2b-256 4ee6e9d6fa7d4a15315bf317ed9fbe873e6848ae8dea4fdd536faee9b5a0b618

See more details on using hashes here.

File details

Details for the file forecose-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: forecose-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.0 {"ci":null,"cpu":"AMD64","implementation":{"name":"CPython","version":"3.14.3"},"installer":{"name":"hatch","version":"1.17.0"},"openssl_version":"OpenSSL 3.0.18 30 Sep 2025","python":"3.14.3","system":{"name":"Windows","release":"11"}} HTTPX2/2.4.0

File hashes

Hashes for forecose-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 582d52cf0f8dfdeaa29dff8865f54657fd34ece1d122d310fe9de9ae85cbf19c
MD5 a5665dc4641faea527e1e2e2ae11b1dc
BLAKE2b-256 94d9fc0b646d4cb70300cf1d9d894cc7e9c382e56b83dd2e0c6bb77b99157996

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page