Skip to main content

Prela SDK

Fire-and-forget trace ingestion SDK for TraceShield.

Installation

pip install prela

Quick Start

from prela import Prela

prela = Prela(
    api_key="ts_ingest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    endpoint="https://api.traceshield.example.com",
)

# Manual trace
prela.trace(
    input="What is my account balance?",
    output="I don't have access to account information.",
)

# OpenAI integration
from prela.integrations.openai import PrelaOpenAI
from openai import OpenAI

client = PrelaOpenAI(OpenAI(), prela)
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
)

# Before process exit
prela.shutdown()

Design

  • Fire-and-forget: Never blocks the agent's response path
  • Zero dependencies: Only requires httpx
  • Batching: Buffers traces and sends every 500ms or 50 traces
  • Resilient: Drops traces on failure, logs warnings, never raises

License

Private. All rights reserved.

Metadata

Release files for traceshield-prela 0.2.0

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

Source distribution (sdist)

Source distribution for traceshield-prela 0.2.0
File Size Uploaded
traceshield_prela-0.2.0.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for traceshield-prela 0.2.0
File Interpreter ABI Platform
traceshield_prela-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.7 kB

Release files / traceshield_prela-0.2.0.tar.gz

Download URL traceshield_prela-0.2.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1e9ae4771430fe37dc4c009d557f4ba568227dffe45f199142505a94d390a5f2
BLAKE2b-256 checksum
How to use checksums
ae8faae3823f54ee1937adbf8cf304e095ba605b87b4204bee546bb4d12237e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / traceshield_prela-0.2.0-py3-none-any.whl

Download URL traceshield_prela-0.2.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18f4706ce52cc43d347fe4a418a362bd150e4806ce649b25bf354f88962ee1c2
BLAKE2b-256 checksum
How to use checksums
54d7c35af1c2162140fe95a38fb63976d07fdfa9778ce19c826a424acde88a23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

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