A wrapper in python for the Terra endpoints and models.
User Guide: https://docs.tryterra.co/docs/python-project-1
Install using
pip install terra-pythonThen import the Terra class from terra.base_client
Initialise a new Terra instance with:
from terra.base_client import Terra
terra = Terra(api_key='YOUR API KEY', dev_id='YOUR DEV ID', secret='YOUR TERRA SECRET');Now you can call the following functions from the instance:
from_user_idget_activity_for_userget_body_for_userget_daily_for_userget_sleep_for_userget_athlete_for_userget_menstruation_for_userget_nutrition_for_usergenerate_widget_sessiongenerate_authentication_urlget_user_infodeauthenticate_userlist_userslist_providerscheck_terra_signaturehandle_flask_webhookshandle_webhooks
The documentation for the wrapper is available here: https://tryterra.github.io/terra-client-python/
In addition, all the data models documented on https://docs.tryterra.co/data-models are available to import and use.
The models support autocompleting the types to manipulate data coming from Terra