Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

terra-python

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terra-python

A python wrapper for the Terra API.

  • 0.0.15
  • PyPI
  • Socket score

Maintainers
1

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

# For user authentication
terra = Terra(api_key='YOUR API KEY', dev_id='YOUR DEV ID');

# For web hook endpoints
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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc