Getting Started

Configuration

Configure Tork for your environment with API keys, regions, and advanced options.

API Key Setup

Set your API key using environment variables (recommended) or pass it directly to the client:

bash
# .env file
TORK_API_KEY=tork_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
TORK_ENVIRONMENT=production  # or 'development'

Never commit API keys to version control. Add .env to your .gitignore file.

Client Configuration

Configure the client with additional options:

python
from tork_governance import TorkClient

client = TorkClient(
    api_key="your_api_key",           # Or use TORK_API_KEY env var
    environment="production",          # 'production' or 'development'
    region="us",                       # 'us', 'eu', or 'apac'
    timeout=30,                        # Request timeout in seconds
    max_retries=3,                     # Number of retry attempts
    enable_logging=True,               # Enable debug logging
)
javascript
import { TorkClient } from '@torknetwork/sdk';

const client = new TorkClient({
  apiKey: process.env.TORK_API_KEY,
  environment: 'production',
  region: 'us',
  timeout: 30000,
  maxRetries: 3,
  enableLogging: true,
});

Data Regions

Choose a region for data residency compliance:

RegionLocationCompliance
usUnited StatesSOC 2, HIPAA
euEuropean UnionGDPR, SOC 2
apacAsia PacificSOC 2

Environment Variables Reference

VariableDescriptionDefault
TORK_API_KEYYour API keyRequired
TORK_ENVIRONMENTEnvironment nameproduction
TORK_REGIONData regionus
TORK_TIMEOUTRequest timeout (ms)30000
TORK_LOG_LEVELLogging levelinfo

Next Step: Learn about PII Detection to start protecting sensitive data.

Documentation

Learn to integrate TORK

Upgrade Plan

Current: free

Support

Get help from our team