Skip to main content

A python wrapper for the Terra API

Project description

GitHub license docs

Terra Python Package

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-python

Then 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_id
  • get_activity_for_user
  • get_body_for_user
  • get_daily_for_user
  • get_sleep_for_user
  • get_athlete_for_user
  • get_menstruation_for_user
  • get_nutrition_for_user
  • generate_widget_session
  • generate_authentication_url
  • get_user_info
  • deauthenticate_user
  • list_users
  • list_providers
  • check_terra_signature
  • handle_flask_webhooks
  • handle_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/docs/data-models] are available to import and use.

The models support autocompleting the types to manipulate data coming from Terra

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terra-python-0.0.14.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terra_python-0.0.14-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file terra-python-0.0.14.tar.gz.

File metadata

  • Download URL: terra-python-0.0.14.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for terra-python-0.0.14.tar.gz
Algorithm Hash digest
SHA256 d100ec1acdf6e034018735b15a9f832ed2cff81afc626eeb75118e88f3691a30
MD5 d3a9bdcebf0579eecdb05fac6ebaf48b
BLAKE2b-256 51cf0f6b61efa4f2b7953dbe010756c2094938110a3785360714a965a829ec2b

See more details on using hashes here.

File details

Details for the file terra_python-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: terra_python-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 34.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.7

File hashes

Hashes for terra_python-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 7a8c29a370574aab48e5c4ece8af9f90cf819e4b9c49e07e0232a7818d4a8a03
MD5 e855bb3dd308f51b6f8f908b9f0ba2f1
BLAKE2b-256 0bdcb9923cd99de7d8b6e66821baaa19ca712722de95e6459f40975c39584b5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page