Getting Started
The vital
PyPI package (Vital API Python SDK) provides typed bindings
of the Vital API in Python that tracks our OpenAPI Schema.
Horizon AI Python SDK is a standalone product offering, separately from the vital
PyPI package.
Horizon AI Python SDK bridges Vital’s data aggregation and intelligence capabilities with the rich Python ecosystem for scientific computing and data analysis.
Authentication
Installation
Aggregation API
Add a dependency
Add the vitalx-aggregation
package to your project.
SDK Command Line Tool
Add a dependency
Add the vitalx-cli
package as a dev dependency to your project.
Start the device authentication process
Create the ~/.vitalx
directory, and grant it execute permission. The SDK requires execute
permission to maintain a file lock.
Call the auth login
CLI subcommand on the vitalx-cli
package to start the authentication
process.
Sign in with your Vital Dashboard account
You would be prompted in your default web browser to sign-in to the Vital Dashboard. You will then be asked to confirm the device authorization.
Voila!
You have now signed-in. You can now use any Horizon AI SDK entity without a Vital API Key.
Your permanent session is stored at ~/.vitalx/
.
Example
tryvital/vitalx-notebook is a pre-configured Jupyter Notebook project with dependencies on Aggregation API and SDK Command Line Tool pre-configured.
The notebook also includes an example to compute Chronotypes using the Aggregation API.