Skip to main content

Installation

Install the Tracia SDK using pip:

Requirements

  • Python 3.10+
  • Dependencies: httpx, pydantic, litellm

Configuration

Initialize the Tracia client with your API key:

Configuration Options

Environment Variables

We recommend storing your API key in environment variables:
.env
Never commit API keys to version control. Use environment variables or a secrets manager.

Context Manager

The SDK supports context managers for automatic resource cleanup:

Async Context Manager

Async Support

Every method has both sync and async variants. Async methods use the a prefix:

Type Exports

The SDK exports all types for type checking:

Next Steps

Prompts SDK

Manage and run prompts stored in Tracia

Run Local

Execute prompts directly against LLM providers