trodo-python 2.10.6__tar.gz → 2.10.7__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 (47) hide show
  1. {trodo_python-2.10.6 → trodo_python-2.10.7}/PKG-INFO +1 -1
  2. {trodo_python-2.10.6 → trodo_python-2.10.7}/pyproject.toml +1 -1
  3. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/__init__.py +27 -1
  4. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo_python.egg-info/PKG-INFO +1 -1
  5. {trodo_python-2.10.6 → trodo_python-2.10.7}/README.md +0 -0
  6. {trodo_python-2.10.6 → trodo_python-2.10.7}/setup.cfg +0 -0
  7. {trodo_python-2.10.6 → trodo_python-2.10.7}/tests/test_anon_distinct_id 2.py +0 -0
  8. {trodo_python-2.10.6 → trodo_python-2.10.7}/tests/test_anon_distinct_id.py +0 -0
  9. {trodo_python-2.10.6 → trodo_python-2.10.7}/tests/test_auto_instrument_fixes.py +0 -0
  10. {trodo_python-2.10.6 → trodo_python-2.10.7}/tests/test_cross_process_session.py +0 -0
  11. {trodo_python-2.10.6 → trodo_python-2.10.7}/tests/test_end_run.py +0 -0
  12. {trodo_python-2.10.6 → trodo_python-2.10.7}/tests/test_error_enrichment.py +0 -0
  13. {trodo_python-2.10.6 → trodo_python-2.10.7}/tests/test_llm_usage_cost.py +0 -0
  14. {trodo_python-2.10.6 → trodo_python-2.10.7}/tests/test_processor_methods.py +0 -0
  15. {trodo_python-2.10.6 → trodo_python-2.10.7}/tests/test_register_otel.py +0 -0
  16. {trodo_python-2.10.6 → trodo_python-2.10.7}/tests/test_start_run.py +0 -0
  17. {trodo_python-2.10.6 → trodo_python-2.10.7}/tests/test_wrap_agent_unchanged.py +0 -0
  18. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/api/__init__.py +0 -0
  19. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/api/async_client.py +0 -0
  20. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/api/endpoints.py +0 -0
  21. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/api/http_client.py +0 -0
  22. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/auto/__init__.py +0 -0
  23. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/auto/auto_event_manager.py +0 -0
  24. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/client.py +0 -0
  25. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/managers/__init__.py +0 -0
  26. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/managers/group_manager.py +0 -0
  27. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/managers/people_manager.py +0 -0
  28. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/otel/__init__.py +0 -0
  29. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/otel/auto_instrument.py +0 -0
  30. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/otel/context.py +0 -0
  31. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/otel/helpers.py +0 -0
  32. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/otel/processor.py +0 -0
  33. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/otel/register.py +0 -0
  34. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/otel/transport.py +0 -0
  35. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/otel/wrap_agent.py +0 -0
  36. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/queue/__init__.py +0 -0
  37. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/queue/batch_flusher.py +0 -0
  38. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/queue/event_queue.py +0 -0
  39. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/session/__init__.py +0 -0
  40. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/session/server_session.py +0 -0
  41. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/session/session_manager.py +0 -0
  42. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/types.py +0 -0
  43. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo/user_context.py +0 -0
  44. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo_python.egg-info/SOURCES.txt +0 -0
  45. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo_python.egg-info/dependency_links.txt +0 -0
  46. {trodo_python-2.10.6 → trodo_python-2.10.7}/trodo_python.egg-info/requires.txt +0 -0
  47. {trodo_python-2.10.6 → trodo_python-2.10.7}/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.10.6
3
+ Version: 2.10.7
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.10.6"
7
+ version = "2.10.7"
8
8
  description = "Trodo Analytics SDK for Python — server-side event tracking"
9
9
  readme = "README.md"
10
10
  license = { text = "ISC" }
@@ -40,7 +40,7 @@ Downstream microservice (join the caller's run instead of making a new one):
40
40
 
41
41
  from __future__ import annotations
42
42
 
43
- __version__ = "2.10.6"
43
+ __version__ = "2.10.7"
44
44
 
45
45
  from typing import Any, Callable, Dict, List, Optional, Union
46
46
 
@@ -71,6 +71,8 @@ __all__ = [
71
71
  "for_user",
72
72
  "track",
73
73
  "identify",
74
+ "people_set",
75
+ "people_set_once",
74
76
  "wallet_address",
75
77
  "reset",
76
78
  "enable_auto_events",
@@ -219,6 +221,18 @@ def identify(identify_id: str, session_id: Optional[str] = None) -> UserContext:
219
221
  return _get_client().identify(identify_id, session_id)
220
222
 
221
223
 
224
+ def people_set(distinct_id: str, properties: Dict[str, Any]):
225
+ """Set profile properties for a user — module-level convenience mirroring
226
+ ``trodo.people.set(distinctId, props)`` in trodo-node. Equivalent to
227
+ ``trodo.for_user(distinct_id).people.set(properties)``."""
228
+ return _get_client().people_set(distinct_id, properties)
229
+
230
+
231
+ def people_set_once(distinct_id: str, properties: Dict[str, Any]):
232
+ """set_once variant of :func:`people_set` — only fills missing keys."""
233
+ return _get_client().people_set_once(distinct_id, properties)
234
+
235
+
222
236
  def wallet_address(distinct_id: str, wallet_addr: str) -> WalletAddressResult:
223
237
  return _get_client().wallet_address(distinct_id, wallet_addr)
224
238
 
@@ -400,6 +414,7 @@ def llm(
400
414
  provider: Optional[str] = None,
401
415
  temperature: Optional[float] = None,
402
416
  extract_usage: Optional[Callable[[Any], Any]] = None,
417
+ extract_usage_map: Optional[Callable[[Any], Optional[Dict[str, float]]]] = None,
403
418
  ) -> Any:
404
419
  """Wrap an LLM call — auto-captures tokens from OpenAI/Anthropic/Gemini
405
420
  response shapes. Dual-form helper and decorator."""
@@ -411,6 +426,7 @@ def llm(
411
426
  provider=provider,
412
427
  temperature=temperature,
413
428
  extract_usage=extract_usage,
429
+ extract_usage_map=extract_usage_map,
414
430
  )
415
431
 
416
432
 
@@ -448,6 +464,11 @@ def track_llm_call(
448
464
  provider: Optional[str] = None,
449
465
  input_tokens: Optional[int] = None,
450
466
  output_tokens: Optional[int] = None,
467
+ cache_read_tokens: Optional[int] = None,
468
+ cache_write_tokens: Optional[int] = None,
469
+ usage_details: Optional[Dict[str, float]] = None,
470
+ usage: Any = None,
471
+ cost_details: Optional[Dict[str, float]] = None,
451
472
  prompt: Any = None,
452
473
  completion: Any = None,
453
474
  temperature: Optional[float] = None,
@@ -462,6 +483,11 @@ def track_llm_call(
462
483
  provider=provider,
463
484
  input_tokens=input_tokens,
464
485
  output_tokens=output_tokens,
486
+ cache_read_tokens=cache_read_tokens,
487
+ cache_write_tokens=cache_write_tokens,
488
+ usage_details=usage_details,
489
+ usage=usage,
490
+ cost_details=cost_details,
465
491
  prompt=prompt,
466
492
  completion=completion,
467
493
  temperature=temperature,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trodo-python
3
- Version: 2.10.6
3
+ Version: 2.10.7
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