{"id":15486066,"url":"https://github.com/gagebenne/pydexcom","last_synced_at":"2025-05-14T15:07:18.302Z","repository":{"id":45372304,"uuid":"239246796","full_name":"gagebenne/pydexcom","owner":"gagebenne","description":"A simple Python API to interact with Dexcom Share service","archived":false,"fork":false,"pushed_at":"2025-03-21T02:45:56.000Z","size":187,"stargazers_count":181,"open_issues_count":2,"forks_count":39,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-05-13T16:52:02.972Z","etag":null,"topics":["dexcom","home-assistant","pypi"],"latest_commit_sha":null,"homepage":"https://gagebenne.github.io/pydexcom/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gagebenne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-09T04:31:44.000Z","updated_at":"2025-05-11T18:05:17.000Z","dependencies_parsed_at":"2024-06-18T13:56:10.584Z","dependency_job_id":"fb63c96b-df2c-4be8-b4e6-cd35318cfc1c","html_url":"https://github.com/gagebenne/pydexcom","commit_stats":{"total_commits":156,"total_committers":6,"mean_commits":26.0,"dds":0.1923076923076923,"last_synced_commit":"07e7b67d83f5483a38ebd6ffcda13bd768afb47a"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagebenne%2Fpydexcom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagebenne%2Fpydexcom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagebenne%2Fpydexcom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagebenne%2Fpydexcom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gagebenne","download_url":"https://codeload.github.com/gagebenne/pydexcom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254169596,"owners_count":22026213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dexcom","home-assistant","pypi"],"created_at":"2024-10-02T06:06:07.149Z","updated_at":"2025-05-14T15:07:18.263Z","avatar_url":"https://github.com/gagebenne.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PyPI](https://img.shields.io/pypi/v/pydexcom?style=flat-square)](https://pypi.org/project/pydexcom/)\n[![Python versions](https://img.shields.io/pypi/pyversions/pytest.svg?style=flat-square)](https://pypi.org/project/pydexcom/)\n[![Pre-commit](https://img.shields.io/github/actions/workflow/status/gagebenne/pydexcom/pre-commit.yaml?style=flat-square\u0026label=pre-commit)](https://github.com/gagebenne/pydexcom/actions/workflows/pre-commit.yaml)\n[![Tests](https://img.shields.io/github/actions/workflow/status/gagebenne/pydexcom/test.yaml?style=flat-square\u0026label=tests)](https://github.com/gagebenne/pydexcom/actions/workflows/test.yaml)\n[![Docs](https://img.shields.io/github/actions/workflow/status/gagebenne/pydexcom/docs.yaml?style=flat-square\u0026label=docs)](https://gagebenne.github.io/pydexcom/pydexcom.html)\n\nA simple Python API to interact with Dexcom Share service. Used to get *real-time* Dexcom CGM sensor data.\n\n# Quick-start\n1. Download the [Dexcom G7 / G6 / G5 / G4](https://www.dexcom.com/apps) mobile app and [enable the Share service](https://provider.dexcom.com/education-research/cgm-education-use/videos/setting-dexcom-share-and-follow).\n\nThe Dexcom Share service requires setup of at least one follower to enable the share service, but `pydexcom` will use your (or the dependent's) credentials, not the follower's or manager's.\n\n2. Install the `pydexcom` package.\n\n`pip install pydexcom`\n\n3. Profit.\n\n```python\n\u003e\u003e\u003e from pydexcom import Dexcom\n\u003e\u003e\u003e dexcom = Dexcom(username=\"username\", password=\"password\") # `region=\"ous\"` if outside of US, `region=\"jp\"` if Japan\n\u003e\u003e\u003e dexcom = Dexcom(username=\"+11234567890\", password=\"password\") # phone number\n\u003e\u003e\u003e dexcom = Dexcom(username=\"user@email.com\", password=\"password\") # email address\n\u003e\u003e\u003e dexcom = Dexcom(account_id=\"12345678-90ab-cdef-1234-567890abcdef\", password=\"password\") # account ID (advanced)\n\u003e\u003e\u003e glucose_reading = dexcom.get_current_glucose_reading()\n\u003e\u003e\u003e print(glucose_reading)\n85\n\n\u003e\u003e\u003e glucose_reading.value\n85\n\n\u003e\u003e\u003e glucose_reading.mmol_l\n4.7\n\n\u003e\u003e\u003e glucose_reading.trend\n4\n\n\u003e\u003e\u003e glucose_reading.trend_direction\n'Flat'\n\n\u003e\u003e\u003e glucose_reading.trend_description\n'steady'\n\n\u003e\u003e\u003e glucose_reading.trend_arrow\n'→'\n\n\u003e\u003e\u003e print(bg.datetime)\n2023-08-07 20:40:58\n\n\u003e\u003e\u003e glucose_reading.json\n{'WT': 'Date(1691455258000)', 'ST': 'Date(1691455258000)', 'DT': 'Date(1691455258000-0400)', 'Value': 85, 'Trend': 'Flat'}\n```\n\n# Documentation\n\n[https://gagebenne.github.io/pydexcom/pydexcom.html](https://gagebenne.github.io/pydexcom/pydexcom.html)\n\n# Frequently Asked Questions\n\n## Why is my password not working?\n\nThe Dexcom Share API understandably reports limited information during account validation. If anything is incorrect, the API simply reports back invalid password ( `pydexcom.errors.AccountErrorEnum` ). However, there could be many reasons you are getting this error:\n\n**1. Ensure your credentials are valid.**\n\nValidate your Dexcom account credentials by logging on to the Dexcom Account Management website for your region:\n\nFor users in the United States: [uam1.dexcom.com](https://uam1.dexcom.com).\nFor users outside of the United States: [uam2.dexcom.com](https://uam2.dexcom.com).\nFor users in the Asia-Pacific: [uam.dexcom.jp](https://uam.dexcom.jp).\n\n**2. Use the correct Dexcom Share API endpoint.**\n\nFor users in the United States: use the default, or set `region=\"us\"` when initializing `Dexcom`.\nFor users outside of the United States: be sure to set `region=\"ous\"` when initializing `Dexcom` .\nFor users in Japan: be sure to set `region=\"jp\"` when initializing `Dexcom`.\n\n**3. Ensure your username is correctly formatted.**\n\nFormat phone numbers with a `+`, your country code, then your phone number. For example, a US phone number of `(123)-456-7890` would be supplied as a `username=\"+11234567890\"`.\n\n**4. Use _your_ Dexcom Share credentials, not the _follower's_ credentials.**\n\nUse the same credentials used to login to the Dexcom mobile application publishing the glucose readings.\n\n**5. Ensure you have at least one follower on Dexcom Share.**\n\nThe Dexcom Share service requires setup of at least one follower to enable the service, as does this package.\n\n**6. Try using your account ID.**\n\nYou can find your account ID by logging in to Dexcom Account Management website for your region. After logging in, note the UUID in the URL -- this is your account ID.\n\nFormat account IDs (UUIDs) with hyphens. For example, an account ID of `1234567890abcdef1234567890abcdef` found in the URL after logging in would be supplied as `account_id=\"12345678-90ab-cdef-1234-567890abcdef\"`.\n\n**7. Report it!**\n\nThe Dexcom Share API sometimes changes. If you believe there is an issue with `pydexcom` , feel free to [create an issue](https://github.com/gagebenne/pydexcom/issues/new) if one has not been created yet already.\n\n## Why not use the official Dexcom Developer API?\n\nThe official Dexcom API is a great tool to view trends, statistics, and day-by-day data, but is not suitable for real time fetching of glucose readings as it is a retrospective API.\n\n## Can I use the Dexcom Stelo with this package?\n\nNo, the Dexcom Stelo isn't compatible with the Dexcom Share service, so this package can't retrieve its readings.\n\n## How can I let you know of suggestions or issues?\n\nBy all means submit a pull request if you have a feature you would like to see in the next release. Alternatively, you may [create an issue](https://github.com/gagebenne/pydexcom/issues/new) if you have a suggestion or bug you'd like to report.\n\n## Where is this package being used?\n\nPrimarily this package is used in the [Home Assistant Dexcom integration](https://www.home-assistant.io/integrations/dexcom/), but it's fantastic to see community projects involving `pydexcom` :\n\n* [Tracking glucose levels using a Raspberry Pi and e-ink display](https://www.tomshardware.com/news/raspberry-project-diy-dexcom-glucose-tracker)\n\n* [Glucose Readings in a Terminal Prompt](https://harthoover.com/glucose-readings-in-a-terminal-prompt/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgagebenne%2Fpydexcom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgagebenne%2Fpydexcom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgagebenne%2Fpydexcom/lists"}