platypush.backend.google.fit

class platypush.backend.google.fit.GoogleFitBackend(data_sources, user_id='me', poll_seconds=60, *args, **kwargs)[source]

This backend will listen for new Google Fit events (e.g. new weight/height measurements, new fitness activities etc.) on the specified data streams and fire an event upon new data.

Triggers:

Requires:

__init__(data_sources, user_id='me', poll_seconds=60, *args, **kwargs)[source]
Parameters:
  • data_sources (list[str]) – Google Fit data source IDs to monitor. You can get a list of the available data sources through the platypush.plugins.google.fit.get_data_sources() action
  • user_id (str) – Google user ID to track (default: ‘me’)
  • poll_seconds (float) – How often the backend will query the data sources for new data points (default: 60 seconds)
run()[source]

Starts the backend thread. To be implemented in the derived classes if the loop method isn’t defined.