driftrail 2.0.0__py3-none-any.whl → 2.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- driftrail/__init__.py +190 -6
- driftrail/client.py +501 -313
- driftrail/types.py +642 -1
- driftrail-2.1.0.dist-info/METADATA +469 -0
- driftrail-2.1.0.dist-info/RECORD +9 -0
- driftrail-2.0.0.dist-info/METADATA +0 -226
- driftrail-2.0.0.dist-info/RECORD +0 -9
- {driftrail-2.0.0.dist-info → driftrail-2.1.0.dist-info}/WHEEL +0 -0
- {driftrail-2.0.0.dist-info → driftrail-2.1.0.dist-info}/licenses/LICENSE +0 -0
- {driftrail-2.0.0.dist-info → driftrail-2.1.0.dist-info}/top_level.txt +0 -0
driftrail/__init__.py
CHANGED
|
@@ -1,19 +1,203 @@
|
|
|
1
1
|
"""
|
|
2
2
|
DriftRail Python SDK
|
|
3
3
|
AI Safety & Observability Platform
|
|
4
|
+
|
|
5
|
+
Usage:
|
|
6
|
+
from driftrail import DriftRail, DriftRailEnterprise
|
|
7
|
+
|
|
8
|
+
# Basic client
|
|
9
|
+
client = DriftRail(api_key="dr_live_...", app_id="my-app")
|
|
10
|
+
|
|
11
|
+
# Enterprise client with full features
|
|
12
|
+
enterprise = DriftRailEnterprise(api_key="dr_live_...", app_id="my-app")
|
|
4
13
|
"""
|
|
5
14
|
|
|
6
15
|
from .client import DriftRail, DriftRailAsync, DriftRailEnterprise
|
|
7
|
-
from .types import
|
|
16
|
+
from .types import (
|
|
17
|
+
# Core types
|
|
18
|
+
Provider,
|
|
19
|
+
Message,
|
|
20
|
+
SourceRef,
|
|
21
|
+
ToolCall,
|
|
22
|
+
InputPayload,
|
|
23
|
+
OutputPayload,
|
|
24
|
+
Metadata,
|
|
25
|
+
IngestPayload,
|
|
26
|
+
IngestResponse,
|
|
27
|
+
# Guard types
|
|
28
|
+
GuardMode,
|
|
29
|
+
GuardAction,
|
|
30
|
+
GuardTriggered,
|
|
31
|
+
GuardClassification,
|
|
32
|
+
GuardResult,
|
|
33
|
+
GuardBlockedError,
|
|
34
|
+
# Incident types
|
|
35
|
+
Incident,
|
|
36
|
+
IncidentStats,
|
|
37
|
+
# Compliance types
|
|
38
|
+
ComplianceFramework,
|
|
39
|
+
ComplianceStatus,
|
|
40
|
+
ComplianceScore,
|
|
41
|
+
ComplianceReportMeta,
|
|
42
|
+
CustomControl,
|
|
43
|
+
# Executive types
|
|
44
|
+
KpiTargets,
|
|
45
|
+
ExecutiveMetrics,
|
|
46
|
+
# Model Analytics types
|
|
47
|
+
HistoricalLog,
|
|
48
|
+
ModelSwitch,
|
|
49
|
+
EnvironmentStats,
|
|
50
|
+
ModelBenchmark,
|
|
51
|
+
ModelAnalyticsSummary,
|
|
52
|
+
# Drift types
|
|
53
|
+
DriftMetrics,
|
|
54
|
+
DriftAlert,
|
|
55
|
+
DriftTrend,
|
|
56
|
+
DriftBaseline,
|
|
57
|
+
DriftScore,
|
|
58
|
+
# Drift V3 types
|
|
59
|
+
NotificationChannel,
|
|
60
|
+
DriftSegment,
|
|
61
|
+
CorrelationEvent,
|
|
62
|
+
DistributionSnapshot,
|
|
63
|
+
SeasonalityPattern,
|
|
64
|
+
BaselineStatistics,
|
|
65
|
+
# Tracing types
|
|
66
|
+
SpanType,
|
|
67
|
+
Trace,
|
|
68
|
+
Span,
|
|
69
|
+
# Prompt types
|
|
70
|
+
Prompt,
|
|
71
|
+
PromptVersion,
|
|
72
|
+
# Evaluation types
|
|
73
|
+
EvalDataset,
|
|
74
|
+
EvalDatasetItem,
|
|
75
|
+
EvalRun,
|
|
76
|
+
EvalResult,
|
|
77
|
+
# Cache types
|
|
78
|
+
CacheSettings,
|
|
79
|
+
CacheStats,
|
|
80
|
+
CacheLookupResult,
|
|
81
|
+
# Simulation types
|
|
82
|
+
Simulation,
|
|
83
|
+
SimulationRun,
|
|
84
|
+
SimulationTurn,
|
|
85
|
+
SimulationStats,
|
|
86
|
+
# Integration types
|
|
87
|
+
Integration,
|
|
88
|
+
# Benchmark types
|
|
89
|
+
BenchmarkMetric,
|
|
90
|
+
BenchmarkReport,
|
|
91
|
+
Industry,
|
|
92
|
+
# Guardrail types
|
|
93
|
+
Guardrail,
|
|
94
|
+
GuardrailStats,
|
|
95
|
+
# Retention types
|
|
96
|
+
RetentionPolicy,
|
|
97
|
+
RetentionSummary,
|
|
98
|
+
# Audit types
|
|
99
|
+
AuditLog,
|
|
100
|
+
# Event types
|
|
101
|
+
Event,
|
|
102
|
+
# Custom Detection types
|
|
103
|
+
CustomDetection,
|
|
104
|
+
# Webhook types
|
|
105
|
+
Webhook,
|
|
106
|
+
)
|
|
8
107
|
|
|
9
|
-
__version__ = "2.
|
|
108
|
+
__version__ = "2.1.0"
|
|
10
109
|
__all__ = [
|
|
11
|
-
|
|
12
|
-
"
|
|
110
|
+
# Clients
|
|
111
|
+
"DriftRail",
|
|
112
|
+
"DriftRailAsync",
|
|
13
113
|
"DriftRailEnterprise",
|
|
14
|
-
|
|
15
|
-
"IngestResponse",
|
|
114
|
+
# Core types
|
|
16
115
|
"Provider",
|
|
116
|
+
"Message",
|
|
117
|
+
"SourceRef",
|
|
118
|
+
"ToolCall",
|
|
119
|
+
"InputPayload",
|
|
120
|
+
"OutputPayload",
|
|
121
|
+
"Metadata",
|
|
122
|
+
"IngestPayload",
|
|
123
|
+
"IngestResponse",
|
|
124
|
+
# Guard types
|
|
125
|
+
"GuardMode",
|
|
126
|
+
"GuardAction",
|
|
127
|
+
"GuardTriggered",
|
|
128
|
+
"GuardClassification",
|
|
17
129
|
"GuardResult",
|
|
18
130
|
"GuardBlockedError",
|
|
131
|
+
# Incident types
|
|
132
|
+
"Incident",
|
|
133
|
+
"IncidentStats",
|
|
134
|
+
# Compliance types
|
|
135
|
+
"ComplianceFramework",
|
|
136
|
+
"ComplianceStatus",
|
|
137
|
+
"ComplianceScore",
|
|
138
|
+
"ComplianceReportMeta",
|
|
139
|
+
"CustomControl",
|
|
140
|
+
# Executive types
|
|
141
|
+
"KpiTargets",
|
|
142
|
+
"ExecutiveMetrics",
|
|
143
|
+
# Model Analytics types
|
|
144
|
+
"HistoricalLog",
|
|
145
|
+
"ModelSwitch",
|
|
146
|
+
"EnvironmentStats",
|
|
147
|
+
"ModelBenchmark",
|
|
148
|
+
"ModelAnalyticsSummary",
|
|
149
|
+
# Drift types
|
|
150
|
+
"DriftMetrics",
|
|
151
|
+
"DriftAlert",
|
|
152
|
+
"DriftTrend",
|
|
153
|
+
"DriftBaseline",
|
|
154
|
+
"DriftScore",
|
|
155
|
+
# Drift V3 types
|
|
156
|
+
"NotificationChannel",
|
|
157
|
+
"DriftSegment",
|
|
158
|
+
"CorrelationEvent",
|
|
159
|
+
"DistributionSnapshot",
|
|
160
|
+
"SeasonalityPattern",
|
|
161
|
+
"BaselineStatistics",
|
|
162
|
+
# Tracing types
|
|
163
|
+
"SpanType",
|
|
164
|
+
"Trace",
|
|
165
|
+
"Span",
|
|
166
|
+
# Prompt types
|
|
167
|
+
"Prompt",
|
|
168
|
+
"PromptVersion",
|
|
169
|
+
# Evaluation types
|
|
170
|
+
"EvalDataset",
|
|
171
|
+
"EvalDatasetItem",
|
|
172
|
+
"EvalRun",
|
|
173
|
+
"EvalResult",
|
|
174
|
+
# Cache types
|
|
175
|
+
"CacheSettings",
|
|
176
|
+
"CacheStats",
|
|
177
|
+
"CacheLookupResult",
|
|
178
|
+
# Simulation types
|
|
179
|
+
"Simulation",
|
|
180
|
+
"SimulationRun",
|
|
181
|
+
"SimulationTurn",
|
|
182
|
+
"SimulationStats",
|
|
183
|
+
# Integration types
|
|
184
|
+
"Integration",
|
|
185
|
+
# Benchmark types
|
|
186
|
+
"BenchmarkMetric",
|
|
187
|
+
"BenchmarkReport",
|
|
188
|
+
"Industry",
|
|
189
|
+
# Guardrail types
|
|
190
|
+
"Guardrail",
|
|
191
|
+
"GuardrailStats",
|
|
192
|
+
# Retention types
|
|
193
|
+
"RetentionPolicy",
|
|
194
|
+
"RetentionSummary",
|
|
195
|
+
# Audit types
|
|
196
|
+
"AuditLog",
|
|
197
|
+
# Event types
|
|
198
|
+
"Event",
|
|
199
|
+
# Custom Detection types
|
|
200
|
+
"CustomDetection",
|
|
201
|
+
# Webhook types
|
|
202
|
+
"Webhook",
|
|
19
203
|
]
|