sledtrace 0.7.0__tar.gz
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.
- sledtrace-0.7.0/LICENSE +21 -0
- sledtrace-0.7.0/PKG-INFO +159 -0
- sledtrace-0.7.0/README.md +131 -0
- sledtrace-0.7.0/pyproject.toml +46 -0
- sledtrace-0.7.0/raglens/__init__.py +23 -0
- sledtrace-0.7.0/raglens/chunks.py +499 -0
- sledtrace-0.7.0/raglens/client.py +0 -0
- sledtrace-0.7.0/raglens/models.py +73 -0
- sledtrace-0.7.0/raglens/trace.py +367 -0
- sledtrace-0.7.0/setup.cfg +4 -0
- sledtrace-0.7.0/sledtrace/__init__.py +24 -0
- sledtrace-0.7.0/sledtrace/cli.py +100 -0
- sledtrace-0.7.0/sledtrace.egg-info/PKG-INFO +159 -0
- sledtrace-0.7.0/sledtrace.egg-info/SOURCES.txt +18 -0
- sledtrace-0.7.0/sledtrace.egg-info/dependency_links.txt +1 -0
- sledtrace-0.7.0/sledtrace.egg-info/entry_points.txt +2 -0
- sledtrace-0.7.0/sledtrace.egg-info/requires.txt +3 -0
- sledtrace-0.7.0/sledtrace.egg-info/top_level.txt +2 -0
- sledtrace-0.7.0/tests/test_packaging_readiness.py +134 -0
- sledtrace-0.7.0/tests/test_rebrand_compatibility.py +56 -0
sledtrace-0.7.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SledTrace contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
sledtrace-0.7.0/PKG-INFO
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sledtrace
|
|
3
|
+
Version: 0.7.0
|
|
4
|
+
Summary: Local-first tracing and debugging SDK for RAG pipelines
|
|
5
|
+
Author: SledTrace Contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Schromeo/SledTrace
|
|
8
|
+
Project-URL: Documentation, https://github.com/Schromeo/SledTrace#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/Schromeo/SledTrace
|
|
10
|
+
Project-URL: Issues, https://github.com/Schromeo/SledTrace/issues
|
|
11
|
+
Keywords: rag,observability,tracing,llm,ai,debugging
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# SledTrace Python SDK
|
|
30
|
+
|
|
31
|
+
SledTrace is a local-first observability and debugging SDK for RAG pipelines.
|
|
32
|
+
|
|
33
|
+
Current release: **0.7.0 — External Developer Readiness**
|
|
34
|
+
|
|
35
|
+
Project and visual overview: [github.com/Schromeo/SledTrace](https://github.com/Schromeo/SledTrace)
|
|
36
|
+
|
|
37
|
+
## Distribution status
|
|
38
|
+
|
|
39
|
+
Install the released SDK and CLI from production PyPI:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
python -m pip install sledtrace==0.7.0
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The immutable `0.7.0rc1` publication candidate remains available on [TestPyPI](https://test.pypi.org/project/sledtrace/0.7.0rc1/) for release-history purposes.
|
|
46
|
+
|
|
47
|
+
## Install from source for development
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cd sdk/python
|
|
51
|
+
python -m pip install -e .
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Build a local wheel or sdist
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
cd sdk/python
|
|
58
|
+
python -m pip install --upgrade pip
|
|
59
|
+
python -m pip install build
|
|
60
|
+
python -m build
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
This produces wheel and source-distribution artifacts in `dist/`.
|
|
64
|
+
|
|
65
|
+
## Install the built wheel
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
python -m pip install dist/*.whl
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## CLI
|
|
72
|
+
|
|
73
|
+
Editable and wheel installations provide:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
sledtrace --help
|
|
77
|
+
sledtrace serve --help
|
|
78
|
+
sledtrace version
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`sledtrace version` reports `0.7.0` for this release.
|
|
82
|
+
|
|
83
|
+
`sledtrace serve` must be run from inside a SledTrace source checkout. It locates the repository from the current working directory and delegates to `scripts/start-sledtrace.py`. The wheel does not bundle the Collector, Dashboard, Docker assets, or a standalone serving runtime; outside a checkout, `serve` exits with actionable guidance.
|
|
84
|
+
|
|
85
|
+
## Basic usage
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
from sledtrace import trace
|
|
89
|
+
|
|
90
|
+
with trace("example") as t:
|
|
91
|
+
t.retrieval(
|
|
92
|
+
query="What is the refund policy?",
|
|
93
|
+
chunks=[
|
|
94
|
+
{
|
|
95
|
+
"id": "chunk-1",
|
|
96
|
+
"text": "Refunds are accepted within 30 days with proof of purchase.",
|
|
97
|
+
"score": 0.92,
|
|
98
|
+
"metadata": {"source": "refund_policy.md"},
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
top_k=1,
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
t.llm(
|
|
105
|
+
model="demo-model",
|
|
106
|
+
prompt="Question: What is the refund policy?",
|
|
107
|
+
response="Refunds are accepted within 30 days with proof of purchase.",
|
|
108
|
+
provider="local-demo",
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
t.flush()
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Collector URL configuration
|
|
115
|
+
|
|
116
|
+
The default collector URL is `http://localhost:4319`.
|
|
117
|
+
|
|
118
|
+
Use the SledTrace environment variable:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
export SLEDTRACE_COLLECTOR_URL=http://localhost:4319
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
PowerShell:
|
|
125
|
+
|
|
126
|
+
```powershell
|
|
127
|
+
$env:SLEDTRACE_COLLECTOR_URL="http://localhost:4319"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Legacy compatibility remains temporarily supported for migration:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
export RAGLENS_COLLECTOR_URL=http://localhost:4319
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The precedence is:
|
|
137
|
+
|
|
138
|
+
1. `SLEDTRACE_COLLECTOR_URL`
|
|
139
|
+
2. `RAGLENS_COLLECTOR_URL`
|
|
140
|
+
3. `http://localhost:4319`
|
|
141
|
+
|
|
142
|
+
## Legacy compatibility note
|
|
143
|
+
|
|
144
|
+
Legacy `raglens` imports remain temporarily supported during migration, but new code should use the SledTrace package path:
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
from sledtrace import trace
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## More docs
|
|
151
|
+
|
|
152
|
+
- [Full project README and screenshots](https://github.com/Schromeo/SledTrace#readme)
|
|
153
|
+
- [User onboarding guide](https://github.com/Schromeo/SledTrace/blob/main/docs/product/USER_ONBOARDING.md)
|
|
154
|
+
- [Python SDK integration guide](https://github.com/Schromeo/SledTrace/blob/main/docs/integrations/PYTHON_SDK_GUIDE.md)
|
|
155
|
+
- [v0.7.0 release](https://github.com/Schromeo/SledTrace/releases/tag/v0.7.0)
|
|
156
|
+
|
|
157
|
+
Repository examples such as `examples.custom_pipeline_demo` are local developer examples and not a separate public SDK surface.
|
|
158
|
+
|
|
159
|
+
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# SledTrace Python SDK
|
|
2
|
+
|
|
3
|
+
SledTrace is a local-first observability and debugging SDK for RAG pipelines.
|
|
4
|
+
|
|
5
|
+
Current release: **0.7.0 — External Developer Readiness**
|
|
6
|
+
|
|
7
|
+
Project and visual overview: [github.com/Schromeo/SledTrace](https://github.com/Schromeo/SledTrace)
|
|
8
|
+
|
|
9
|
+
## Distribution status
|
|
10
|
+
|
|
11
|
+
Install the released SDK and CLI from production PyPI:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
python -m pip install sledtrace==0.7.0
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The immutable `0.7.0rc1` publication candidate remains available on [TestPyPI](https://test.pypi.org/project/sledtrace/0.7.0rc1/) for release-history purposes.
|
|
18
|
+
|
|
19
|
+
## Install from source for development
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
cd sdk/python
|
|
23
|
+
python -m pip install -e .
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Build a local wheel or sdist
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
cd sdk/python
|
|
30
|
+
python -m pip install --upgrade pip
|
|
31
|
+
python -m pip install build
|
|
32
|
+
python -m build
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This produces wheel and source-distribution artifacts in `dist/`.
|
|
36
|
+
|
|
37
|
+
## Install the built wheel
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
python -m pip install dist/*.whl
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## CLI
|
|
44
|
+
|
|
45
|
+
Editable and wheel installations provide:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
sledtrace --help
|
|
49
|
+
sledtrace serve --help
|
|
50
|
+
sledtrace version
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`sledtrace version` reports `0.7.0` for this release.
|
|
54
|
+
|
|
55
|
+
`sledtrace serve` must be run from inside a SledTrace source checkout. It locates the repository from the current working directory and delegates to `scripts/start-sledtrace.py`. The wheel does not bundle the Collector, Dashboard, Docker assets, or a standalone serving runtime; outside a checkout, `serve` exits with actionable guidance.
|
|
56
|
+
|
|
57
|
+
## Basic usage
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from sledtrace import trace
|
|
61
|
+
|
|
62
|
+
with trace("example") as t:
|
|
63
|
+
t.retrieval(
|
|
64
|
+
query="What is the refund policy?",
|
|
65
|
+
chunks=[
|
|
66
|
+
{
|
|
67
|
+
"id": "chunk-1",
|
|
68
|
+
"text": "Refunds are accepted within 30 days with proof of purchase.",
|
|
69
|
+
"score": 0.92,
|
|
70
|
+
"metadata": {"source": "refund_policy.md"},
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
top_k=1,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
t.llm(
|
|
77
|
+
model="demo-model",
|
|
78
|
+
prompt="Question: What is the refund policy?",
|
|
79
|
+
response="Refunds are accepted within 30 days with proof of purchase.",
|
|
80
|
+
provider="local-demo",
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
t.flush()
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Collector URL configuration
|
|
87
|
+
|
|
88
|
+
The default collector URL is `http://localhost:4319`.
|
|
89
|
+
|
|
90
|
+
Use the SledTrace environment variable:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
export SLEDTRACE_COLLECTOR_URL=http://localhost:4319
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
PowerShell:
|
|
97
|
+
|
|
98
|
+
```powershell
|
|
99
|
+
$env:SLEDTRACE_COLLECTOR_URL="http://localhost:4319"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Legacy compatibility remains temporarily supported for migration:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
export RAGLENS_COLLECTOR_URL=http://localhost:4319
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The precedence is:
|
|
109
|
+
|
|
110
|
+
1. `SLEDTRACE_COLLECTOR_URL`
|
|
111
|
+
2. `RAGLENS_COLLECTOR_URL`
|
|
112
|
+
3. `http://localhost:4319`
|
|
113
|
+
|
|
114
|
+
## Legacy compatibility note
|
|
115
|
+
|
|
116
|
+
Legacy `raglens` imports remain temporarily supported during migration, but new code should use the SledTrace package path:
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
from sledtrace import trace
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## More docs
|
|
123
|
+
|
|
124
|
+
- [Full project README and screenshots](https://github.com/Schromeo/SledTrace#readme)
|
|
125
|
+
- [User onboarding guide](https://github.com/Schromeo/SledTrace/blob/main/docs/product/USER_ONBOARDING.md)
|
|
126
|
+
- [Python SDK integration guide](https://github.com/Schromeo/SledTrace/blob/main/docs/integrations/PYTHON_SDK_GUIDE.md)
|
|
127
|
+
- [v0.7.0 release](https://github.com/Schromeo/SledTrace/releases/tag/v0.7.0)
|
|
128
|
+
|
|
129
|
+
Repository examples such as `examples.custom_pipeline_demo` are local developer examples and not a separate public SDK surface.
|
|
130
|
+
|
|
131
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "sledtrace"
|
|
3
|
+
version = "0.7.0"
|
|
4
|
+
description = "Local-first tracing and debugging SDK for RAG pipelines"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
requires-python = ">=3.9"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "SledTrace Contributors" }
|
|
10
|
+
]
|
|
11
|
+
keywords = ["rag", "observability", "tracing", "llm", "ai", "debugging"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 4 - Beta",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"Operating System :: OS Independent",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.9",
|
|
18
|
+
"Programming Language :: Python :: 3.10",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
"Topic :: Software Development :: Libraries",
|
|
22
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
23
|
+
]
|
|
24
|
+
dependencies = []
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Homepage = "https://github.com/Schromeo/SledTrace"
|
|
28
|
+
Documentation = "https://github.com/Schromeo/SledTrace#readme"
|
|
29
|
+
Repository = "https://github.com/Schromeo/SledTrace"
|
|
30
|
+
Issues = "https://github.com/Schromeo/SledTrace/issues"
|
|
31
|
+
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
dev = [
|
|
34
|
+
"pytest>=8",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[project.scripts]
|
|
38
|
+
sledtrace = "sledtrace.cli:main"
|
|
39
|
+
|
|
40
|
+
[tool.setuptools.packages.find]
|
|
41
|
+
where = ["."]
|
|
42
|
+
include = ["raglens*", "sledtrace*"]
|
|
43
|
+
|
|
44
|
+
[build-system]
|
|
45
|
+
requires = ["setuptools>=68", "wheel"]
|
|
46
|
+
build-backend = "setuptools.build_meta"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import warnings
|
|
2
|
+
|
|
3
|
+
from .trace import trace, RAGLensTrace, SledTraceTrace
|
|
4
|
+
from .chunks import ChunkNormalizationError, normalize_chunk, normalize_chunks
|
|
5
|
+
|
|
6
|
+
__version__ = "0.7.0"
|
|
7
|
+
|
|
8
|
+
warnings.warn(
|
|
9
|
+
"The 'raglens' package is deprecated and kept only for temporary compatibility. "
|
|
10
|
+
"Please import from 'sledtrace' instead.",
|
|
11
|
+
DeprecationWarning,
|
|
12
|
+
stacklevel=2,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"__version__",
|
|
17
|
+
"trace",
|
|
18
|
+
"SledTraceTrace",
|
|
19
|
+
"RAGLensTrace",
|
|
20
|
+
"ChunkNormalizationError",
|
|
21
|
+
"normalize_chunk",
|
|
22
|
+
"normalize_chunks",
|
|
23
|
+
]
|