API Reference§

This section contains a comprehensive summary of Wearipedia modules, functions, classes, and methods.

Package-level Methods§

wearipedia.get_device(device_name, **kwargs)[source]§

Get a device object by name. This is the main entry point for the library.

Keep in mind that the keyword arguments are device-specific!

Parameters:

device_name (str) – the name of the device to get, e.g. “garmin/fenix_7s”

Returns:

a device object

Return type:

BaseDevice

Example

import wearipedia

# Get a device object
device = wearipedia.get_device("whoop/whoop_4")
...

wearipedia.get_version() str[source]§

Get the version of the library.

Returns:

the version of the library

Return type:

str


wearipedia.get_all_device_names()[source]§

Get a list of all device names.

Returns:

a list of device names

Return type:

List

Devices§

class wearipedia.devices.dexcom.DexcomProCGM(seed=0, synthetic_start_date='2022-02-16', synthetic_end_date='2022-05-15')[source]§

Bases: BaseDevice

This device allows you to work with data from the Dexcom Pro CGM device. Available datatypes for this device are:

  • data: contains all data in one dictionary

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • synthetic_end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.garmin.Fenix7S(seed=0, synthetic_start_date='2022-03-01', synthetic_end_date='2022-06-17', use_cache=True)[source]§

Bases: BaseDevice

This device allows you to work with data from the Garmin Fenix 7S device. Available datatypes for this device are:

  • dates: a list of consecutive dates

  • steps: a sibling list to dates that contains step data for each day

  • hrs: a sibling list to dates that contains heart rate data for each day

  • brpms: a sibling list to dates that contains breath rate data for each day

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • synthetic_end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

  • use_cache (bool, optional) – decide whether to cache the credentials, defaults to True

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.polar.VeritySense(seed=0, start_date='2022-03-01', end_date='2022-06-17')[source]§

Bases: BaseDevice

This device allows you to work with data from the Polar Verity Sense device. Available datatypes for this device are:

  • sessions: contains data from all sessions in one

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.polar.H10(seed=0, start_date='2022-03-01', end_date='2022-06-17')[source]§

Bases: BaseDevice

This device allows you to work with data from the Polar H10 device. Available datatypes for this device are:

  • sessions: contains data from all sessions in one

  • rr: contains data from all rr sessions in one

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.nutrisense.cgm(seed=0, synthetic_start_date='2022-03-01', synthetic_end_date='2022-06-17', use_cache=False)[source]§

Bases: BaseDevice

This device allows you to work with data from the Nutrisense CGM device. Available datatypes for this device are:

  • continuous: contains the continuous glucose data

  • summary: contains summary statistics of the continuous glucose data

  • scores: contains glucose scores

  • statistics: contains further statistics about the continuous glucose data

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

Attributes:
authenticated
synthetic_has_been_generated

Methods

Deprecated since version 0.1.0: Authentication and real data retrieval is deprecated for this device as a result of an internal change to the company’s API.

class wearipedia.devices.whoop.Whoop4(seed=0, synthetic_start_date='2022-03-01', synthetic_end_date='2022-06-17')[source]§

Bases: BaseDevice

This device allows you to work with data from the WHOOP 4.0 device. Available datatypes for this device are:

  • cycles: a DataFrame of all cycles (days)

  • hr: heart rate data

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • synthetic_end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

  • use_cache (bool, optional) – decide whether to cache the credentials, defaults to True

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.withings.BodyPlus(seed=0, synthetic_start_date='2021-06-01')[source]§

Bases: BaseDevice

This device allows you to work with data from the Withings Body+ device. Available datatypes for this device are:

  • measurements: contains all measurements made with the scale

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date – start date for synthetic data generation, defaults to “2021-06-01”

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.withings.ScanWatch(seed=0, synthetic_start_date='2022-03-01', synthetic_end_date='2022-06-17')[source]§

Bases: BaseDevice

This device allows you to work with data from the Withings ScanWatch device. Available datatypes for this device are:

  • heart_rates: heart rate data

  • sleeps: sleep data

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date – start date for synthetic data generation, defaults to “2022-03-01”

  • synthetic_end_date – end date for synthetic data generation, defaults to “2022-06-17”

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.myfitnesspal.MyFitnessPal(seed=0, start_date='2022-03-01', end_date='2022-06-17')[source]§

Bases: BaseDevice

This device allows you to work with data from the MyFitnessPal app. Available datatypes for this device are:

  • goals: a list that contains goals data for each day

  • daily_summary: a list that contains daily summary data for each day

  • exercises_cardio: a list that contains cardio exercises data for each day

  • exercises_strength: a list that contains strength exercises data for each day

  • lunch: a list that contains lunch data for each day

  • breakfast: a list that contains breakfast data for each day

  • dinner: a list that contains dinner data for each day

  • snacks: a list that contains snacks data for each day

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • synthetic_end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

  • use_cache (bool, optional) – decide whether to cache the credentials, defaults to True

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.google.GoogleFitness(seed=0, start_date='2022-03-01', end_date='2022-06-17')[source]§

Bases: BaseDevice

This device allows you to work with data from the Google Fit app. Available datatypes for this device are:

  • steps: a list that contains total steps walked for each day

  • heart_rate: a list that contains heart rate data for each day

  • sleep: a list that contains sleep data for each day

  • heart_minutes: a list that contains heart minutes data for each day

  • blood_pressure: a list that contains blood pressure data for each day

  • blood_glucose: a list that contains blood glucose data for each day

  • body_temperature: a list that contains body temperature data for each day

  • calories_expended: a list that contains calories expended data for each day

  • activity_minutes: a list that contains activity minutes data for each day

  • height: a list that contains height data for each day

  • oxygen_saturation: a list that contains oxygen saturation data for each day

  • menstruation: a list that contains menstruation data for each day

  • speed: a list that contains speed data for each day

  • weight: a list that contains weight data for each day

  • distance: a list that contains distance data for each day

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • synthetic_end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

  • use_cache (bool, optional) – decide whether to cache the credentials, defaults to True

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.strava.Strava(seed=0, start_date='2022-03-01', end_date='2022-06-17')[source]§

Bases: BaseDevice

This device allows you to work with data from the Strava app. Available datatypes for this device are:

  • distance: a list that contains distance ran for each run recorded

  • moving_time: a list that contains moving time for each run recorded

  • elapsed_time: a list that contains elapsed time for each run recorded

  • total_elevation_gain: a list that contains total elevation gain for each run recorded

  • average_speed: a list that contains average speed for each run recorded

  • max_speed: a list that contains max speed for each run recorded

  • average_heartrate: a list that contains average heartrate for each run recorded

  • max_heartrate: a list that contains max heartrate for each run recorded

  • map_summary_polyline: a list that contains map summary polyline for each run recorded

  • elev_high: a list that contains elevation high for each run recorded

  • elev_low: a list that contains elevation low for each run recorded

  • average_cadence: a list that contains average cadence for each run recorded

  • average_watts: a list that contains average watts for each run recorded

  • kilojoules: a list that contains kilojoules for each run recorded

  • heartrate: a list that contains heartrate for each run recorded (stream data). Use id to specify the specific activity.

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • synthetic_end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

  • use_cache (bool, optional) – decide whether to cache the credentials, defaults to True

:param id : id of the activity, defaults to ‘’, required for stream data :type id: str, optional

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.polar.PolarVantage(seed=0, start_date='2022-03-01', end_date='2022-06-17')[source]§

Bases: BaseDevice

This device allows you to work with data from the Polar Vantage device. Available datatypes for this device are:

  • sleep: a list that contains sleep data for each day

  • training_history: a list that contains training history data for each day

  • training_by_id: a list that contains training data for a given training session

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • synthetic_end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

  • use_cache (bool, optional) – decide whether to cache the credentials, defaults to True

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.coros.Coros_pace_2(seed=0, synthetic_start_date='2022-03-01', synthetic_end_date='2022-06-17')[source]§

Bases: BaseDevice

This device allows you to work with data from the Fitbit charge device. Available datatypes for this device are:

  • steps: steps data

  • exercise_time: exercise time data

  • heart_rate: heart rate data

  • sports: sports data

  • sleep: sleep data

  • active_energy: active energy data

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • synthetic_end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.oura.Oura_Ring_3(seed=0, synthetic_start_date='2022-03-01', synthetic_end_date='2022-06-17')[source]§

Bases: BaseDevice

This device allows you to work with data from the Oura Ring 3 device. Available datatypes for this device are:

  • sleep: sleep data

  • daily_activity: daily activity data

  • activity: activity data

  • ideal_bedtime: ideal bedtime data

  • readiness: readiness data

  • heart_rate: heart_rate

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • synthetic_end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.fitbit.Fitbit_charge_4(seed=0, synthetic_start_date='2022-12-01', synthetic_end_date='2023-01-01')[source]§

Bases: BaseDevice

This device allows you to work with data from the Fitbit charge device. Available datatypes for this device are:

  • sleep: sleep data

  • steps: steps data

  • minutesVeryActive: number of minutes with high activity

  • minutesLightlyActive: number of minutes with light activity

  • minutesFairlyActive: number of minutes with fair activity

  • distance: in miles

  • minutesSedentary: number of minutes with no activity

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • synthetic_end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.

class wearipedia.devices.fitbit.Fitbit_sense(seed=0, synthetic_start_date='2022-06-30', synthetic_end_date='2023-01-01')[source]§

Bases: BaseDevice

This device allows you to work with data from the Fitbit Sense device. Available datatypes for this device are:

  • sleep: sleep data

  • steps: steps data

  • minutesVeryActive: number of minutes with high activity

  • minutesLightlyActive: number of minutes with light activity

  • minutesFairlyActive: number of minutes with fair activity

  • distance: in miles

  • minutesSedentary: number of minutes with no activity

  • heart_rate_day: heart rate data

  • hrv: heart rate variability data

  • distance_day: distance moved per day detailed by each minute

Parameters:
  • seed (int, optional) – random seed for synthetic data generation, defaults to 0

  • synthetic_start_date (str, optional) – start date for synthetic data generation, defaults to “2022-03-01”

  • synthetic_end_date (str, optional) – end date for synthetic data generation, defaults to “2022-06-17”

Attributes:
authenticated
synthetic_has_been_generated

Methods

authenticate(auth_creds)

Authenticates the device against the API.

get_data(data_type[, params])

Gets data from the API according to the data_type and params.