Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

⚠️ Beta Notice

This SDK is currently in beta. All APIs are experimental and subject to change. Please review the release notes for any breaking changes before upgrading.

Statsig Python AI SDK

Statsig is the on-stop data platform for product development. We help you move faster with feature gates (feature flags), experiments, and the world's most powerful stats engine. If you're new to Statsig, check out our product and create an account at statsig.com.

The AI SDK provides convenient hooks for developers working with LLMs to iterate on their promps, run evals to test their efficacy, add observability to LLM usage.

Getting Started

Read through the Documentation to see code samples and how to get started.

Running Examples

The examples/ directory contains working examples demonstrating various features of the SDK.

Prerequisites

Set up your environment variables:

export STATSIG_API_KEY="your-statsig-api-key"
export OPENAI_API_KEY="your-openai-api-key"  # For OpenAI wrapper examples

Running an Example

python examples/ai_wrappers/wrap_openai.py

Available examples:

  • examples/ai_wrappers/wrap_openai.py - Demonstrates wrapping OpenAI clients with Statsig telemetry (sync/async, streaming/non-streaming)

Community

If you need any assistance or just have a question, feel free to reach out to us on Slack.

Metadata

Release files for statsig-ai 0.0.1b8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for statsig-ai 0.0.1b8
File Size Uploaded
statsig_ai-0.0.1b8.tar.gz 30.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for statsig-ai 0.0.1b8
File Interpreter ABI Platform
statsig_ai-0.0.1b8-py3-none-any.whl Python 3 none any Details

Total release size: 56.3 kB

Release files / statsig_ai-0.0.1b8.tar.gz

Download URL statsig_ai-0.0.1b8.tar.gz
Size 30.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8b2a27c7c1576c4c79662a5f83cd956b4ae83dd178ee99d936b17fada8a4b307
BLAKE2b-256 checksum
How to use checksums
71624710e702da02aad21ace59390b5705ad29276f94ffdd0df8c62736aa2221
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / statsig_ai-0.0.1b8-py3-none-any.whl

Download URL statsig_ai-0.0.1b8-py3-none-any.whl
Size 26.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9967a70805017d1bee4abc174c2fe5b5216dc20e641615fb72b88ca04bb814e
BLAKE2b-256 checksum
How to use checksums
d4a46a09f4a02431901f7f9a04c4f00a43e63c76875786b742bf501efbcb86cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page