threadify-sdk 0.2.7__tar.gz → 0.2.8__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 (28) hide show
  1. {threadify_sdk-0.2.7/threadify_sdk.egg-info → threadify_sdk-0.2.8}/PKG-INFO +1 -1
  2. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/pyproject.toml +1 -1
  3. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify/connection.py +10 -0
  4. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify/models.py +1 -0
  5. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify/thread.py +1 -0
  6. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8/threadify_sdk.egg-info}/PKG-INFO +1 -1
  7. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/CHANGELOG.md +0 -0
  8. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/LICENSE +0 -0
  9. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/MANIFEST.in +0 -0
  10. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/README.md +0 -0
  11. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/setup.cfg +0 -0
  12. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/tests/test_client.py +0 -0
  13. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/tests/test_connection.py +0 -0
  14. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/tests/test_data_retriever.py +0 -0
  15. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/tests/test_models.py +0 -0
  16. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/tests/test_notification.py +0 -0
  17. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/tests/test_step.py +0 -0
  18. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/tests/test_thread.py +0 -0
  19. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify/__init__.py +0 -0
  20. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify/client.py +0 -0
  21. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify/data_retriever.py +0 -0
  22. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify/notification.py +0 -0
  23. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify/otel_exporter.py +0 -0
  24. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify/step.py +0 -0
  25. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify_sdk.egg-info/SOURCES.txt +0 -0
  26. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify_sdk.egg-info/dependency_links.txt +0 -0
  27. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify_sdk.egg-info/requires.txt +0 -0
  28. {threadify_sdk-0.2.7 → threadify_sdk-0.2.8}/threadify_sdk.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: threadify-sdk
3
- Version: 0.2.7
3
+ Version: 0.2.8
4
4
  Summary: Python SDK for Threadify — Service-delivery intelligence. Track every customer request from start to finish across every system, team, and partner. Visit: https://threadify.dev
5
5
  Author-email: Threadify Team <team@threadify.dev>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "threadify-sdk"
7
- version = "0.2.7"
7
+ version = "0.2.8"
8
8
  description = "Python SDK for Threadify — Service-delivery intelligence. Track every customer request from start to finish across every system, team, and partner. Visit: https://threadify.dev"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -35,6 +35,7 @@ from threadify.models import (
35
35
  FIELD_SERVICE_NAME,
36
36
  FIELD_STATUS,
37
37
  FIELD_STEP_NAME,
38
+ FIELD_TAGS,
38
39
  FIELD_THREAD_ID,
39
40
  FIELD_THREAD_ID_ACK,
40
41
  FIELD_THREAD_TOKEN,
@@ -144,6 +145,7 @@ class Connection:
144
145
  contract_name: str = "",
145
146
  service_name: str = "",
146
147
  refs: dict[str, Any] | None = None,
148
+ tags: list[str] | None = None,
147
149
  ) -> ThreadInstance:
148
150
  from threadify.thread import ThreadInstance
149
151
 
@@ -174,6 +176,13 @@ class Connection:
174
176
 
175
177
  msg[FIELD_ROLE] = role
176
178
 
179
+ # Validate and attach tags if provided
180
+ if tags:
181
+ for t in tags:
182
+ if not isinstance(t, str) or not t.strip():
183
+ raise ValueError("Each tag must be a non-empty string")
184
+ msg[FIELD_TAGS] = list(tags)
185
+
177
186
  await self._send(msg)
178
187
 
179
188
  resp = await self._wait_response(lambda m: m.get(FIELD_ACTION) == ACTION_START_THREAD)
@@ -183,6 +192,7 @@ class Connection:
183
192
 
184
193
  thread_id = resp[FIELD_THREAD_ID]
185
194
  thread = ThreadInstance(self, thread_id, contract_name, "", resp.get(FIELD_ACCESS_LEVEL, ""), None)
195
+ thread.tags = list(tags) if tags else []
186
196
  self._threads[thread_id] = thread
187
197
  self._logger.debug(f"Thread started: {thread_id}")
188
198
  return thread
@@ -75,6 +75,7 @@ FIELD_OWNER_ID = "ownerId"
75
75
  FIELD_SEVERITY = "severity"
76
76
  FIELD_TIMESTAMP = "timestamp"
77
77
  FIELD_VIOLATION_TYPE = "violationType"
78
+ FIELD_TAGS = "tags"
78
79
 
79
80
  # Protocol status values
80
81
  STATUS_SUCCESS = "success"
@@ -71,6 +71,7 @@ class ThreadInstance:
71
71
  self.role = role
72
72
  self.access_level = access_level
73
73
  self.refs: dict[str, str] = refs or {}
74
+ self.tags: list[str] = [] # Tags applied at thread creation (immutable)
74
75
 
75
76
  self._steps: dict[str, Any] = {}
76
77
  self._pending_waits: dict[str, _PendingWait] = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: threadify-sdk
3
- Version: 0.2.7
3
+ Version: 0.2.8
4
4
  Summary: Python SDK for Threadify — Service-delivery intelligence. Track every customer request from start to finish across every system, team, and partner. Visit: https://threadify.dev
5
5
  Author-email: Threadify Team <team@threadify.dev>
6
6
  License: MIT
File without changes
File without changes
File without changes
File without changes