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
Deployed Services
Deployed Services
Use the same Vital API Keys your system used to interact with Vital API.
To set the Vital API Key for the Horizon AI Python SDK, you can:
- Pass the Vital API Key explicitly to the Horizon AI SDK entity’s constructor (e.g., the Query Executor); or
- Set the Vital API Key as the
VITAL_API_KEY
environment variable.
Data Scientists and Developers
Data Scientists and Developers
Sign-in locally on your machine with your Vital Dashboard account. You can do so through the Horizon AI SDK Command Line Tool as detailed below.
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.