For the complete documentation index, see llms.txt. This page is also available as Markdown.

Environment Variables

Environment variables — required vars, OS-specific setup,.env file loading, verification.

This guide covers secure practices for managing environment variables when using the Stratix Python SDK.

Overview

Environment variables provide a secure way to configure your Stratix SDK without hardcoding sensitive credentials in your source code. This approach separates configuration from code and enables different configurations for different environments.

Required Environment Variables

The Stratix SDK uses these primary environment variables:

Variable
Description
Required
Example

LAYERLENS_STRATIX_API_KEY

Your Stratix API key

Yes

sk-abc123...

Setting Environment Variables

Development Environment

Linux/macOS (Bash/Zsh):

# Set for current session
export LAYERLENS_STRATIX_API_KEY="sk-your-key-here"

# Add to shell profile for persistence (.bashrc,.zshrc, etc.)
echo 'export LAYERLENS_STRATIX_API_KEY="sk-your-key-here"' >> ~/.bashrc

# Reload shell configuration
source ~/.bashrc

Windows Command Prompt:

Windows PowerShell:

Verification

Check if variables are set correctly:

Using.env Files

Creating.env Files

.env file for development:

Loading.env files in Python:

Last updated

Was this helpful?