A professional Python SDK for the Noveum.ai API. Provides both high-level convenience methods and low-level access to core API endpoints for AI/ML evaluation, testing, and observability.
- Core API Coverage - Essential endpoints for datasets, traces, scorers, projects, and ETL jobs
- Full IDE Support - Complete type hints, autocomplete, and docstrings
- Async & Sync - Both async/await and synchronous support
- Secure - API key authentication, HTTPS only, proper error handling
- Well-Documented - Comprehensive guides, examples, and inline documentation
- Production-Ready - Extensive test suite with integration and unit tests
- Easy to Use - High-level wrapper for common operations
pip install noveum-sdk# Clone the repository
git clone https://github.com/Noveum/noveum-sdk-python.git
cd noveum-sdk-python
# Upgrade pip and setuptools (required for PEP 621)
pip install --upgrade pip setuptools wheel
# Install in development mode
pip install -e .
# Or install with dev dependencies for development
pip install -e ".[dev]"import os
from noveum_api_client import NoveumClient
# Get API key from environment
api_key = os.getenv("NOVEUM_API_KEY")
# Initialize client
client = NoveumClient(api_key=api_key)
# List datasets
datasets = client.list_datasets(limit=10)
print(f"Found {len(datasets['data'])} datasets")
# Get dataset items
items = client.get_dataset_items("my-dataset", limit=50)
for item in items["data"]:
print(f"Item: {item}")
# Get evaluation results
results = client.get_results(dataset_slug="my-dataset")
print(f"Results: {results['data']}")Option 1: Environment Variable (Recommended)
export NOVEUM_API_KEY="nv_your_api_key_here"Then use it in code:
import os
from noveum_api_client import NoveumClient
api_key = os.getenv("NOVEUM_API_KEY")
client = NoveumClient(api_key=api_key)Option 2: Direct Initialization
from noveum_api_client import NoveumClient
client = NoveumClient(api_key="nv_your_api_key_here")Option 3: .env File
# Create .env file
echo "NOVEUM_API_KEY=nv_your_api_key_here" > .envThen load it:
import os
from dotenv import load_dotenv
from noveum_api_client import NoveumClient
load_dotenv()
api_key = os.getenv("NOVEUM_API_KEY")
client = NoveumClient(api_key=api_key)The NoveumClient class provides convenient methods for common operations. Use this for most use cases.
list_datasets(limit=20, offset=0)
List all datasets in your organization.
response = client.list_datasets(limit=10)
print(f"Status: {response['status_code']}")
print(f"Datasets: {response['data']}")Parameters:
limit(int): Number of datasets to return (default: 20)offset(int): Pagination offset (default: 0)
Returns: Dictionary with status_code, data, and headers
get_dataset_items(dataset_slug, limit=20, offset=0)
Get items from a specific dataset.
items = client.get_dataset_items("my-dataset", limit=100)
for item in items["data"]:
print(f"Item ID: {item['id']}, Input: {item['input']}")Parameters:
dataset_slug(str): The dataset slug (required)limit(int): Number of items to return (default: 20)offset(int): Pagination offset (default: 0)
Returns: Dictionary with status_code, data, and headers
get_results(dataset_slug=None, item_id=None, scorer_id=None, limit=100, offset=0)
Get evaluation results with optional filtering.
# Get all results
results = client.get_results()
# Filter by dataset
results = client.get_results(dataset_slug="my-dataset")
# Filter by item
results = client.get_results(item_id="item-123")
# Filter by scorer
results = client.get_results(scorer_id="factuality_scorer")Parameters:
dataset_slug(str): Filter by dataset slug (optional)item_id(str): Filter by item ID (optional)scorer_id(str): Filter by scorer ID (optional)limit(int): Number of results to return (default: 100)offset(int): Pagination offset (default: 0)
Returns: Dictionary with status_code, data, and headers
For advanced use cases, access the generated API directly with full control.
from noveum_api_client import Client
from noveum_api_client.api.datasets import get_api_v1_datasets
# Create low-level client
client = Client(
base_url="https://api.noveum.ai",
headers={"Authorization": f"Bearer {api_key}"}
)
# Call API directly
response = get_api_v1_datasets.sync_detailed(
client=client,
limit=20,
offset=0
)
print(f"Status: {response.status_code}")
print(f"Data: {response.parsed}")The SDK provides access to the following API categories:
| Category | Description |
|---|---|
health/ |
Health check endpoint |
status/ |
API status endpoint |
audio/ |
Audio file upload, retrieval, and management |
datasets/ |
Dataset CRUD operations |
traces/ |
Trace management and querying |
scorers/ |
Scorer definitions and management |
scorer_results/ |
Evaluation results |
projects/ |
Project management |
etl_jobs/ |
ETL job operations |
from noveum_api_client import Client
from noveum_api_client.api.audio import get_api_v1_audio, post_api_v1_audio
client = Client(
base_url="https://api.noveum.ai",
headers={"Authorization": f"Bearer {api_key}"}
)
# List audio files
response = get_api_v1_audio.sync_detailed(client=client)
print(f"Audio files: {response.parsed}")
# Upload audio file
with open("audio.wav", "rb") as f:
response = post_api_v1_audio.sync_detailed(client=client, file=f)
print(f"Uploaded: {response.parsed}")from noveum_api_client.api.traces import get_api_v1_traces, post_api_v1_traces
# List traces
response = get_api_v1_traces.sync_detailed(client=client)
print(f"Traces: {response.parsed}")from noveum_api_client.api.scorers import get_api_v1_scorers
# List scorers
response = get_api_v1_scorers.sync_detailed(client=client)
print(f"Scorers: {response.parsed}")from noveum_api_client.api.etl_jobs import get_api_v1_etl_jobs
# List ETL jobs
response = get_api_v1_etl_jobs.sync_detailed(client=client)
print(f"ETL Jobs: {response.parsed}")Test your model/agent quality in CI/CD pipelines:
from noveum_api_client import NoveumClient
def test_agent_quality():
client = NoveumClient(api_key="nv_...")
# Get test dataset
items = client.get_dataset_items("regression-tests")
# Evaluate each item
failed = 0
for item in items["data"]:
# Run your agent/model
output = my_agent.run(item["input"])
# Get evaluation results
results = client.get_results(item_id=item["id"])
# Check quality
for result in results["data"]:
if result.get("score", 0) < 0.8:
print(f"Item {item['id']} failed: {result['score']}")
failed += 1
# Assert
assert failed == 0, f"{failed} items failed quality check"
print("All items passed quality check")
# Run test
test_agent_quality()Process all items in a dataset:
from noveum_api_client import NoveumClient
client = NoveumClient(api_key="nv_...")
# Get all items (with pagination)
offset = 0
while True:
items = client.get_dataset_items("my-dataset", limit=100, offset=offset)
if not items["data"]:
break
# Process each item
for item in items["data"]:
print(f"Processing item {item['id']}")
# Your processing logic here
offset += 100Analyze evaluation results:
from noveum_api_client import NoveumClient
client = NoveumClient(api_key="nv_...")
# Get all results
results = client.get_results(limit=1000)
# Analyze
total = len(results["data"])
passed = sum(1 for r in results["data"] if r.get("passed"))
avg_score = sum(r.get("score", 0) for r in results["data"]) / total if total > 0 else 0
print(f"Total: {total}")
print(f"Passed: {passed} ({passed/total*100:.1f}%)")
print(f"Average Score: {avg_score:.2f}")Use async for concurrent operations:
import asyncio
from noveum_api_client import Client
from noveum_api_client.api.datasets import get_api_v1_datasets
async def main():
api_key = "nv_..."
client = Client(
base_url="https://api.noveum.ai",
headers={"Authorization": f"Bearer {api_key}"}
)
# Async call
response = await get_api_v1_datasets.asyncio_detailed(client=client)
print(f"Status: {response.status_code}")
print(f"Datasets: {response.parsed}")
# Run
asyncio.run(main())client = NoveumClient(
api_key="nv_...",
base_url="https://custom.api.noveum.ai"
)import httpx
from noveum_api_client import Client
client = Client(
base_url="https://api.noveum.ai",
timeout=httpx.Timeout(30.0) # 30 second timeout
)from noveum_api_client import NoveumClient
# Automatically closes connection
with NoveumClient(api_key="nv_...") as client:
datasets = client.list_datasets()
# Connection automatically closedAll high-level client methods return a dictionary with:
{
"status_code": 200, # HTTP status code
"data": {...}, # Response data (parsed JSON)
"headers": {...} # Response headers
}Check status_code to verify success:
response = client.list_datasets()
if response["status_code"] == 200:
print(f"Success: {response['data']}")
else:
print(f"Error: {response['status_code']}")from noveum_api_client import NoveumClient
client = NoveumClient(api_key="nv_...")
try:
response = client.list_datasets()
if response["status_code"] != 200:
print(f"API Error: {response['status_code']}")
print(f"Response: {response['data']}")
else:
print(f"Success: {response['data']}")
except Exception as e:
print(f"Error: {e}")import httpx
from noveum_api_client import NoveumClient
client = NoveumClient(api_key="nv_...")
try:
response = client.list_datasets()
except httpx.ConnectError:
print("Connection error - check your internet connection")
except httpx.TimeoutException:
print("Request timeout - API is slow or unreachable")
except Exception as e:
print(f"Unexpected error: {e}")For detailed testing instructions, see TESTING.md.
# Install with dev dependencies
pip install -e ".[dev]"
# Run unit tests (fast, no API key needed)
pytest tests/unit/ -v
# Run integration tests (requires API key)
export NOVEUM_API_KEY="nv_your_api_key"
pytest tests/integration/ -v
# Run all tests with coverage
pytest tests/ -v --cov=noveum_api_client --cov-report=term-missingnoveum-sdk-python/
├── noveum_api_client/ # Main package
│ ├── __init__.py # Public API exports
│ ├── client.py # Generated base client
│ ├── noveum_client.py # High-level wrapper
│ ├── errors.py # Error definitions
│ ├── types.py # Type definitions
│ ├── py.typed # PEP 561 type marker
│ ├── api/ # Generated API endpoints
│ │ ├── audio/ # Audio file operations
│ │ ├── datasets/ # Dataset operations
│ │ ├── etl_jobs/ # ETL job management
│ │ ├── health/ # Health check
│ │ ├── projects/ # Project operations
│ │ ├── scorers/ # Scorer operations
│ │ ├── scorer_results/ # Evaluation results
│ │ ├── status/ # Status endpoint
│ │ └── traces/ # Trace operations
│ └── models/ # Data models
├── tests/ # Test suite
│ ├── integration/ # Integration tests with live API
│ │ ├── test_audio.py # Audio API tests
│ │ ├── test_complete_flow.py # End-to-end workflow tests
│ │ ├── test_datasets.py # Dataset tests
│ │ ├── test_etl_jobs.py # ETL job tests
│ │ ├── test_projects.py # Project tests
│ │ ├── test_scorers.py # Scorer tests
│ │ ├── test_scorer_results.py # Scorer results tests
│ │ └── test_traces.py # Trace tests
│ └── unit/ # Unit tests (mocked)
│ ├── test_audio_wrappers.py # Audio API wrapper tests
│ ├── test_client_wrapper.py # High-level client tests
│ ├── test_datasets_wrappers.py # Dataset wrapper tests
│ ├── test_etl_jobs_wrappers.py # ETL job wrapper tests
│ ├── test_models.py # Model tests
│ ├── test_module_structure.py # Module structure tests
│ ├── test_projects_wrappers.py # Project wrapper tests
│ ├── test_scorer_results_wrappers.py # Scorer results wrapper tests
│ ├── test_scorers_wrappers.py # Scorer wrapper tests
│ └── test_traces_wrappers.py # Trace wrapper tests
├── doc/ # Documentation
├── README.md # This file
├── CHANGELOG.md # Version history
├── CONTRIBUTING.md # Contribution guidelines
├── TESTING.md # Testing guide
└── pyproject.toml # Project configuration
Layer 1: Generated API Client
- Auto-generated from OpenAPI schema
- Low-level access to all endpoints
- Full control over parameters
- Both sync and async support
Layer 2: High-Level Wrapper (NoveumClient)
- Convenient methods for common operations
- Simplified API for typical use cases
- Automatic error handling
- Better developer experience
The Noveum ecosystem includes multiple specialized packages:
- noveum-trace - Lightweight tracing SDK for LLM applications and multi-agent systems with decorator-based API
- noveum-sdk - This package - comprehensive API client for evaluation, datasets, and platform management
- Platform: https://noveum.ai/
- PyPI Package: https://pypi.org/project/noveum-sdk/
- API Documentation: https://noveum.ai/docs
- GitHub Repository: https://github.com/Noveum/noveum-sdk-python
- GitHub Issues: https://github.com/Noveum/noveum-sdk-python/issues
- Email: support@noveum.ai
Apache 2.0 License - See LICENSE file for details
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
See CHANGELOG.md for version history and updates.
Status: Production Ready
Last Updated: January 16, 2026
Version: 1.0.3