Python SDK Reference

Explore the Python SDK for programmatic access to Primus functionality.

Overview

The Primus Python SDK provides a simple and intuitive way to interact with Primus programmatically. Use it to automate workflows, manage resources, and integrate Primus into your applications.

Installation

Install the Primus SDK using pip:

pip install primus-sdk

Quick Start

Here's a simple example to get you started:

from primus import Primus

# Initialize the client
primus = Primus(api_key="your-api-key")

# Create a new source
source = primus.sources.create(
    name="My Source",
    type="text",
    data="Sample content"
)

# Run an evaluation
evaluation = primus.evaluations.create(
    source_id=source.id,
    scorecard_id="your-scorecard-id"
)

Complete Documentation

For complete API reference, authentication guides, advanced usage examples, and best practices, visit our comprehensive Python SDK documentation: