Python SDK Setup Guide

The Tensor One Python SDK provides a comprehensive interface for building applications and interacting with the platform’s API from your Python environment. This guide covers installation, configuration, and initial setup procedures.

Installation

Environment Setup

Create and activate a Python virtual environment to maintain clean dependency management:
PlatformCommands
Linux & macOSpython3 -m venv env then source env/bin/activate
Windowspython -m venv env then env\Scripts\activate

SDK Installation

Install the Tensor One SDK using pip:
python -m pip install tensorone

Verification

Confirm successful installation by checking the package details:
pip show tensorone
Expected output:
Name: tensorone
Version: 1.6.1
Summary: Tensor One Python SDK for AI infrastructure
...

Authentication Configuration

Configure authentication using environment variables for secure API access:
import tensorone
import os

tensorone.api_key = os.getenv("TENSORONE_API_KEY")

Security Best Practices

PracticeImplementation
Environment VariablesStore API keys in .env files or system environment
Secrets ManagementUse secure secrets managers in production environments
Key RotationImplement regular API key rotation policies
Warning: Never hardcode API credentials directly in source code.

Next Steps

With the Tensor One SDK installed and configured, you can begin:
  • Cluster Management: Create and manage computational clusters
  • Serverless Endpoints: Deploy and interact with serverless functions
  • Custom Workflows: Build sophisticated AI applications with Python