Skip to main content

Tidepool API - Data Science Python Bindings

-- Project Status: Active

-- Project Disclaimer: This work is for Development

Project Objective

The purpose of this project is to

  • Expose in an organized way the Tidepool API in Python
  • Support data science tasks and projects that use Tidepool data

Project Description

This project is a large refactor of Data Science code integrating with and using the Tidepool API.

Getting Started with this project

Tidepool API

See tidepool_api.py for class representing the api. Code example of downloading health data for a user:

from data_science_tidepool_api_python.makedata.tidepool_api import TidepoolAPI

tp_api = TidepoolAPI(username, password)
tp_api.login()
user_data = tp_api.get_user_event_data()
tp_api.logout()

Projects using the API:

The Tidepool Big Data Donation Project data science code lives in projects/tbddp. The Tidepool Period Project data science code lives in projects/tbddp

Contributing Guide

  1. All are welcome to contribute to this project.
  2. Naming convention for notebooks is [short_description]-[initials]-[date_created]-[version], e.g. initial_data_exploration-jqp-2020-04-25-v-0-1-0.ipynb. A short _ delimited description, the creator's initials, date of creation, and a version number,
  3. Naming convention for data files, figures, and tables is [PHI (if applicable)]-[short_description]-[date created or downloaded]-[code_version], e.g. raw_project_data_from_mnist-2020-04-25-v-0-1-0.csv, or project_data_figure-2020-04-25-v-0-1-0.png.

NOTE: PHI data is never stored in github and the .gitignore file includes this requirement as well.

Tidepool Data Science Team

Name (with github link) Tidepool Slack
Cameron Summers @Cameron Summers

Technologies (Update this list)

  • Python (99% of the time)
  • Anaconda for our virtual environments
  • Pandas for working with data (99% of the time)
  • Google Colab for sharing examples
  • Pytest for testing
  • Travis for continuous integration testing
  • Black for code style
  • Flake8 for linting
  • Sphinx for documentation
  • Numpy docstring format
  • pre-commit for githooks

Getting Started with the Conda Virtual Environment

  1. Install Miniconda. CAUTION for python virtual env users: Anaconda will automatically update your .bash_profile so that conda is launched automatically when you open a terminal. You can deactivate with the command conda deactivate or you can edit your bash_profile.
  2. If you are new to Anaconda check out their getting started docs.
  3. If you want the pre-commit githooks to install automatically, then following these directions.
  4. Clone this repo (for help see this tutorial).
  5. In a terminal, navigate to the directory where you cloned this repo.
  6. Run conda update -n base -c defaults conda to update to the latest version of conda
  7. Run conda env create -f conda-environment.yml --name [input-your-env-name-here]. This will download all of the package dependencies and install them in a conda (python) virtual environment. (Insert your conda env name in the brackets. Do not include the brackets)
  8. Run conda env list to get a list of conda environments and select the environment that was created from the environmental.yml file (hint: environment name is at the top of the file)
  9. Run conda activate <conda-env-name> or source activate <conda-env-name> to start the environment.
  10. If you did not setup your global git-template to automatically install the pre-commit githooks, then run pre-commit install to enable the githooks.
  11. Run deactivate to stop the environment.

Maintaining Compatability with venv and virtualenv

This may seem counterintuitive, but when you are loading new packages into your conda virtual environment, load them in using pip, and export your environment using pip-chill > requirements.txt. We take this approach to make our code compatible with people that prefer to use venv or virtualenv. This may also make it easier to convert existing packages into pypi packages. We only install packages directly in conda using the conda-environment.yml file when packages are not available via pip (e.g., R and plotly-orca).

Metadata

Release files for tidepool-data-science-project 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tidepool-data-science-project 0.0.3
File Size Uploaded Provenance Actions
tidepool_data_science_project-0.0.3.tar.gz 14.3 kB Without provenance Details for tidepool_data_science_project-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tidepool-data-science-project 0.0.3
File Interpreter ABI Platform Actions
tidepool_data_science_project-0.0.3-py3-none-any.whl Python 3 none any Details for tidepool_data_science_project-0.0.3-py3-none-any.whl

Total release size: 28.8 kB

Release files / tidepool_data_science_project-0.0.3.tar.gz

Download URL tidepool_data_science_project-0.0.3.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ef9d6d68f0ae105578d46f8fec6a491755c9f0a40b7678b95c45eb5cb2e5dd8b
BLAKE2b-256 checksum
How to use checksums
94ad366a0e5e7cae82cce4153a6f9ad25e3e3f2405aefaaf4edac50c47238954
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.6

Release files / tidepool_data_science_project-0.0.3-py3-none-any.whl

Download URL tidepool_data_science_project-0.0.3-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb2276056924a1b96740430805ba4da1da47b68971faad098f0fed94e915b8d8
BLAKE2b-256 checksum
How to use checksums
b3454c36072b79d15816e6d962178fd36e4161ddf09cd54125c83cd578cb56a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.6

Security for tidepool-data-science-project 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page