Skip to main content
Install the Lumina SDK for Python applications.

Prerequisites

Python 3.9+ Verify your installation:

Install SDK


Install LLM Provider SDK

Install your LLM provider’s official SDK:

Quick Start

Create a simple trace:
Run it:
Check your dashboard at http://localhost:3000/traces to see the trace.

Framework Integration

FastAPI

Flask

Django


Environment Variables

Set up environment variables for configuration:
Load in your application:
Install python-dotenv if needed: pip install python-dotenv

Verification

Verify the SDK is working: 1. Send a test trace:
2. Check dashboard: Open http://localhost:3000/traces and verify the trace appears.

Troubleshooting

Module not found

Error: ModuleNotFoundError: No module named 'lumina' Solution: Verify the SDK is installed in your active environment:

Connection refused

Error: Failed to export spans ... Connection refused Solution: Verify Lumina is running:
Start Lumina if not running:

Traces not appearing

Traces are batched and exported in the background. Call flush() before your process exits to ensure all spans are sent:

Next Steps

Configuration

Configure the SDK for your environment

Basic Usage

Learn basic tracing patterns

Advanced Usage

Multi-span tracing and async patterns

API Reference

Complete SDK API documentation