trodo-python 2.12.0__tar.gz → 2.13.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.
Files changed (52) hide show
  1. {trodo_python-2.12.0 → trodo_python-2.13.0}/PKG-INFO +1 -1
  2. {trodo_python-2.12.0 → trodo_python-2.13.0}/pyproject.toml +1 -1
  3. {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_prompts.py +5 -5
  4. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/__init__.py +1 -1
  5. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/managers/prompt_manager.py +2 -2
  6. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/prompts/compile.py +1 -1
  7. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/prompts/types.py +1 -1
  8. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo_python.egg-info/PKG-INFO +1 -1
  9. {trodo_python-2.12.0 → trodo_python-2.13.0}/README.md +0 -0
  10. {trodo_python-2.12.0 → trodo_python-2.13.0}/setup.cfg +0 -0
  11. {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_anon_distinct_id.py +0 -0
  12. {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_auto_instrument_fixes.py +0 -0
  13. {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_cross_process_session.py +0 -0
  14. {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_end_run.py +0 -0
  15. {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_error_enrichment.py +0 -0
  16. {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_llm_usage_cost.py +0 -0
  17. {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_processor_methods.py +0 -0
  18. {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_register_otel.py +0 -0
  19. {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_start_run.py +0 -0
  20. {trodo_python-2.12.0 → trodo_python-2.13.0}/tests/test_wrap_agent_unchanged.py +0 -0
  21. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/api/__init__.py +0 -0
  22. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/api/async_client.py +0 -0
  23. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/api/endpoints.py +0 -0
  24. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/api/http_client.py +0 -0
  25. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/auto/__init__.py +0 -0
  26. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/auto/auto_event_manager.py +0 -0
  27. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/client.py +0 -0
  28. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/managers/__init__.py +0 -0
  29. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/managers/group_manager.py +0 -0
  30. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/managers/people_manager.py +0 -0
  31. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/__init__.py +0 -0
  32. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/auto_instrument.py +0 -0
  33. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/context.py +0 -0
  34. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/helpers.py +0 -0
  35. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/processor.py +0 -0
  36. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/register.py +0 -0
  37. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/transport.py +0 -0
  38. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/otel/wrap_agent.py +0 -0
  39. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/prompts/__init__.py +0 -0
  40. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/prompts/template.py +0 -0
  41. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/queue/__init__.py +0 -0
  42. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/queue/batch_flusher.py +0 -0
  43. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/queue/event_queue.py +0 -0
  44. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/session/__init__.py +0 -0
  45. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/session/server_session.py +0 -0
  46. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/session/session_manager.py +0 -0
  47. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/types.py +0 -0
  48. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo/user_context.py +0 -0
  49. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo_python.egg-info/SOURCES.txt +0 -0
  50. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo_python.egg-info/dependency_links.txt +0 -0
  51. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo_python.egg-info/requires.txt +0 -0
  52. {trodo_python-2.12.0 → trodo_python-2.13.0}/trodo_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trodo-python
3
- Version: 2.12.0
3
+ Version: 2.13.0
4
4
  Summary: Trodo Analytics SDK for Python — server-side event tracking
5
5
  License: ISC
6
6
  Keywords: analytics,tracking,trodo,server-side
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "trodo-python"
7
- version = "2.12.0"
7
+ version = "2.13.0"
8
8
  description = "Trodo Analytics SDK for Python — server-side event tracking"
9
9
  readme = "README.md"
10
10
  license = { text = "ISC" }
@@ -81,7 +81,7 @@ PROMPT = {
81
81
  {"role": "system", "content": [{"type": "text", "text": "You are {{persona}}."}]},
82
82
  {"role": "user", "content": [{"type": "text", "text": "Hello {{who}}"}]},
83
83
  ],
84
- "model_config": {"provider": "openai", "model": "gpt-4o", "temperature": 0.3},
84
+ "model": {"provider": "openai", "model": "gpt-4o", "temperature": 0.3},
85
85
  "tools": [],
86
86
  "response_format": None,
87
87
  "variables": [
@@ -99,7 +99,7 @@ def test_compile_returns_structured_messages_not_a_string():
99
99
  assert out.messages[1]["content"][0] == {"type": "text", "text": "Hello world"}
100
100
 
101
101
 
102
- def test_compile_carries_model_config_and_tools():
102
+ def test_compile_carries_model_and_tools():
103
103
  out = compile_prompt(PROMPT, {"who": "world"})
104
104
  assert out.model == {"provider": "openai", "model": "gpt-4o", "temperature": 0.3}
105
105
  assert out.tools == []
@@ -132,7 +132,7 @@ def test_compile_treats_values_as_inert_data():
132
132
  def test_compile_coerces_declared_types():
133
133
  p = {
134
134
  "messages": [{"role": "user", "content": [{"type": "text", "text": "n={{n}}"}]}],
135
- "model_config": {},
135
+ "model": {},
136
136
  "tools": [],
137
137
  "response_format": None,
138
138
  "variables": [{"name": "n", "type": "number"}],
@@ -148,7 +148,7 @@ def test_compile_expands_placeholders_and_preserves_injected_messages():
148
148
  {"role": "system", "content": [{"type": "text", "text": "sys"}]},
149
149
  {"type": "placeholder", "name": "hist"},
150
150
  ],
151
- "model_config": {},
151
+ "model": {},
152
152
  "tools": [],
153
153
  "response_format": None,
154
154
  "variables": [{"name": "hist", "type": "messages"}],
@@ -211,7 +211,7 @@ def test_get_maps_wire_shape_and_binds_compile():
211
211
  assert p.version == 2
212
212
  assert p.labels == ["production"]
213
213
  assert p.tags == ["support"]
214
- assert p.model_config["model"] == "gpt-4o"
214
+ assert p.model["model"] == "gpt-4o"
215
215
  assert p.is_fallback is False
216
216
  assert p.compile(who="world").messages[1]["content"][0]["text"] == "Hello world"
217
217
 
@@ -41,7 +41,7 @@ Downstream microservice (join the caller's run instead of making a new one):
41
41
 
42
42
  from __future__ import annotations
43
43
 
44
- __version__ = "2.12.0"
44
+ __version__ = "2.13.0"
45
45
 
46
46
  from typing import Any, Callable, Dict, List, Optional, Union
47
47
 
@@ -75,7 +75,7 @@ def _to_prompt(raw: Dict[str, Any], is_fallback: bool = False) -> ManagedPrompt:
75
75
  version=int(raw.get("version") or 0),
76
76
  labels=list(raw.get("labels") or []),
77
77
  messages=list(raw.get("messages") or []),
78
- model_config=dict(raw.get("model_config") or {}),
78
+ model=dict(raw.get("model") or {}),
79
79
  tools=list(raw.get("tools") or []),
80
80
  response_format=raw.get("response_format"),
81
81
  variables=_to_variables(raw.get("variables")),
@@ -245,7 +245,7 @@ class PromptManager:
245
245
  "labels": [],
246
246
  "tags": [],
247
247
  "messages": fallback.get("messages") or [],
248
- "model_config": fallback.get("model_config") or {},
248
+ "model": fallback.get("model") or {},
249
249
  "tools": [],
250
250
  "response_format": None,
251
251
  "variables": fallback.get("variables") or [],
@@ -175,7 +175,7 @@ def compile_prompt(prompt: Any, values: Optional[Dict[str, Any]] = None) -> Comp
175
175
 
176
176
  return CompiledPrompt(
177
177
  messages=out,
178
- model=get("model_config") or {},
178
+ model=get("model") or {},
179
179
  tools=get("tools") or [],
180
180
  response_format=get("response_format"),
181
181
  )
@@ -54,7 +54,7 @@ class ManagedPrompt:
54
54
 
55
55
  name: str
56
56
  messages: List[PromptNode] = field(default_factory=list)
57
- model_config: ModelConfig = field(default_factory=dict)
57
+ model: ModelConfig = field(default_factory=dict)
58
58
  tools: List[PromptTool] = field(default_factory=list)
59
59
  response_format: Optional[ResponseFormat] = None
60
60
  variables: List[PromptVariable] = field(default_factory=list)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trodo-python
3
- Version: 2.12.0
3
+ Version: 2.13.0
4
4
  Summary: Trodo Analytics SDK for Python — server-side event tracking
5
5
  License: ISC
6
6
  Keywords: analytics,tracking,trodo,server-side
File without changes
File without changes