tzafon 2.0.1__tar.gz → 2.1.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.

Potentially problematic release.


This version of tzafon might be problematic. Click here for more details.

Files changed (86) hide show
  1. tzafon-2.1.0/.release-please-manifest.json +3 -0
  2. {tzafon-2.0.1 → tzafon-2.1.0}/CHANGELOG.md +13 -0
  3. {tzafon-2.0.1 → tzafon-2.1.0}/PKG-INFO +1 -1
  4. {tzafon-2.0.1 → tzafon-2.1.0}/pyproject.toml +1 -1
  5. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_streaming.py +4 -6
  6. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_version.py +1 -1
  7. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/resources/computers.py +18 -10
  8. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/types/action_result.py +2 -0
  9. tzafon-2.0.1/.release-please-manifest.json +0 -3
  10. {tzafon-2.0.1 → tzafon-2.1.0}/.gitignore +0 -0
  11. {tzafon-2.0.1 → tzafon-2.1.0}/BATCH_API.md +0 -0
  12. {tzafon-2.0.1 → tzafon-2.1.0}/CONTRIBUTING.md +0 -0
  13. {tzafon-2.0.1 → tzafon-2.1.0}/LICENSE +0 -0
  14. {tzafon-2.0.1 → tzafon-2.1.0}/README.md +0 -0
  15. {tzafon-2.0.1 → tzafon-2.1.0}/SECURITY.md +0 -0
  16. {tzafon-2.0.1 → tzafon-2.1.0}/WRAPPER.md +0 -0
  17. {tzafon-2.0.1 → tzafon-2.1.0}/WRAPPER_FUNCTIONALITY.md +0 -0
  18. {tzafon-2.0.1 → tzafon-2.1.0}/api.md +0 -0
  19. {tzafon-2.0.1 → tzafon-2.1.0}/bin/check-release-environment +0 -0
  20. {tzafon-2.0.1 → tzafon-2.1.0}/bin/publish-pypi +0 -0
  21. {tzafon-2.0.1 → tzafon-2.1.0}/examples/.keep +0 -0
  22. {tzafon-2.0.1 → tzafon-2.1.0}/examples/batch_example.py +0 -0
  23. {tzafon-2.0.1 → tzafon-2.1.0}/examples/batch_example_simple.py +0 -0
  24. {tzafon-2.0.1 → tzafon-2.1.0}/examples/clean_api_example.py +0 -0
  25. {tzafon-2.0.1 → tzafon-2.1.0}/noxfile.py +0 -0
  26. {tzafon-2.0.1 → tzafon-2.1.0}/release-please-config.json +0 -0
  27. {tzafon-2.0.1 → tzafon-2.1.0}/requirements-dev.lock +0 -0
  28. {tzafon-2.0.1 → tzafon-2.1.0}/requirements.lock +0 -0
  29. {tzafon-2.0.1 → tzafon-2.1.0}/src/computer/lib/.keep +0 -0
  30. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/__init__.py +0 -0
  31. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_base_client.py +0 -0
  32. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_client.py +0 -0
  33. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_compat.py +0 -0
  34. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_constants.py +0 -0
  35. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_exceptions.py +0 -0
  36. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_files.py +0 -0
  37. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_models.py +0 -0
  38. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_qs.py +0 -0
  39. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_resource.py +0 -0
  40. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_response.py +0 -0
  41. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_types.py +0 -0
  42. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_utils/__init__.py +0 -0
  43. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_utils/_compat.py +0 -0
  44. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_utils/_datetime_parse.py +0 -0
  45. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_utils/_logs.py +0 -0
  46. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_utils/_proxy.py +0 -0
  47. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_utils/_reflection.py +0 -0
  48. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_utils/_resources_proxy.py +0 -0
  49. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_utils/_streams.py +0 -0
  50. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_utils/_sync.py +0 -0
  51. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_utils/_transform.py +0 -0
  52. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_utils/_typing.py +0 -0
  53. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/_utils/_utils.py +0 -0
  54. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/batch_wrapper.py +0 -0
  55. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/client_extensions.py +0 -0
  56. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/py.typed +0 -0
  57. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/resources/__init__.py +0 -0
  58. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/types/__init__.py +0 -0
  59. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/types/computer_create_params.py +0 -0
  60. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/types/computer_execute_action_params.py +0 -0
  61. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/types/computer_execute_batch_params.py +0 -0
  62. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/types/computer_execute_batch_response.py +0 -0
  63. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/types/computer_keep_alive_response.py +0 -0
  64. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/types/computer_list_response.py +0 -0
  65. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/types/computer_navigate_params.py +0 -0
  66. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/types/computer_response.py +0 -0
  67. {tzafon-2.0.1 → tzafon-2.1.0}/src/tzafon/wrapper.py +0 -0
  68. {tzafon-2.0.1 → tzafon-2.1.0}/tests/__init__.py +0 -0
  69. {tzafon-2.0.1 → tzafon-2.1.0}/tests/api_resources/__init__.py +0 -0
  70. {tzafon-2.0.1 → tzafon-2.1.0}/tests/api_resources/test_computers.py +0 -0
  71. {tzafon-2.0.1 → tzafon-2.1.0}/tests/conftest.py +0 -0
  72. {tzafon-2.0.1 → tzafon-2.1.0}/tests/sample_file.txt +0 -0
  73. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_client.py +0 -0
  74. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_deepcopy.py +0 -0
  75. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_extract_files.py +0 -0
  76. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_files.py +0 -0
  77. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_models.py +0 -0
  78. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_qs.py +0 -0
  79. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_required_args.py +0 -0
  80. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_response.py +0 -0
  81. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_streaming.py +0 -0
  82. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_transform.py +0 -0
  83. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_utils/test_datetime_parse.py +0 -0
  84. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_utils/test_proxy.py +0 -0
  85. {tzafon-2.0.1 → tzafon-2.1.0}/tests/test_utils/test_typing.py +0 -0
  86. {tzafon-2.0.1 → tzafon-2.1.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "2.1.0"
3
+ }
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.1.0 (2025-10-30)
4
+
5
+ Full Changelog: [v2.0.1...v2.1.0](https://github.com/tzafon/computer-python/compare/v2.0.1...v2.1.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([2a38a7f](https://github.com/tzafon/computer-python/commit/2a38a7f2bb027dd6cd627df075d0c8c4399e615d))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **client:** close streams without requiring full consumption ([24a5a11](https://github.com/tzafon/computer-python/commit/24a5a114bcb3d3d4ed0c0b5df158e09c99d78a79))
15
+
3
16
  ## 2.0.1 (2025-10-21)
4
17
 
5
18
  Full Changelog: [v2.0.0...v2.0.1](https://github.com/tzafon/computer-python/compare/v2.0.0...v2.0.1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: tzafon
3
- Version: 2.0.1
3
+ Version: 2.1.0
4
4
  Summary: The official Python library for the computer API
5
5
  Project-URL: Homepage, https://github.com/tzafon/computer-python
6
6
  Project-URL: Repository, https://github.com/tzafon/computer-python
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tzafon"
3
- version = "2.0.1"
3
+ version = "2.1.0"
4
4
  description = "The official Python library for the computer API"
5
5
  dynamic = ["readme"]
6
6
  license = "MIT"
@@ -57,9 +57,8 @@ class Stream(Generic[_T]):
57
57
  for sse in iterator:
58
58
  yield process_data(data=sse.json(), cast_to=cast_to, response=response)
59
59
 
60
- # Ensure the entire stream is consumed
61
- for _sse in iterator:
62
- ...
60
+ # As we might not fully consume the response stream, we need to close it explicitly
61
+ response.close()
63
62
 
64
63
  def __enter__(self) -> Self:
65
64
  return self
@@ -121,9 +120,8 @@ class AsyncStream(Generic[_T]):
121
120
  async for sse in iterator:
122
121
  yield process_data(data=sse.json(), cast_to=cast_to, response=response)
123
122
 
124
- # Ensure the entire stream is consumed
125
- async for _sse in iterator:
126
- ...
123
+ # As we might not fully consume the response stream, we need to close it explicitly
124
+ await response.aclose()
127
125
 
128
126
  async def __aenter__(self) -> Self:
129
127
  return self
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "tzafon"
4
- __version__ = "2.0.1" # x-release-please-version
4
+ __version__ = "2.1.0" # x-release-please-version
@@ -66,7 +66,9 @@ class ComputersResource(SyncAPIResource):
66
66
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
67
67
  ) -> ComputerResponse:
68
68
  """
69
- Create a new browser or desktop automation session
69
+ Create a new browser or desktop automation session with configurable timeout.
70
+ Returns endpoints for executing actions, streaming events, and viewing
71
+ screencast.
70
72
 
71
73
  Args:
72
74
  display: TODO: implement
@@ -113,7 +115,7 @@ class ComputersResource(SyncAPIResource):
113
115
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
114
116
  ) -> ComputerResponse:
115
117
  """
116
- Get the current status of a computer instance
118
+ Get the current status and metadata of a computer instance
117
119
 
118
120
  Args:
119
121
  extra_headers: Send extra headers
@@ -166,7 +168,8 @@ class ComputersResource(SyncAPIResource):
166
168
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
167
169
  ) -> ActionResult:
168
170
  """
169
- Execute a single action (screenshot, click, type, navigate, )
171
+ Execute a single action such as screenshot, click, type, navigate, scroll, debug
172
+ or other computer use actions
170
173
 
171
174
  Args:
172
175
  extra_headers: Send extra headers
@@ -235,7 +238,7 @@ class ComputersResource(SyncAPIResource):
235
238
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
236
239
  ) -> ComputerKeepAliveResponse:
237
240
  """
238
- Extend the timeout for a computer session
241
+ Extend the timeout for a computer session and verify it is still running
239
242
 
240
243
  Args:
241
244
  extra_headers: Send extra headers
@@ -337,7 +340,8 @@ class ComputersResource(SyncAPIResource):
337
340
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
338
341
  ) -> None:
339
342
  """
340
- Terminate and clean up a computer instance
343
+ Terminate and clean up a computer instance, stopping the session and recording
344
+ metrics
341
345
 
342
346
  Args:
343
347
  extra_headers: Send extra headers
@@ -396,7 +400,9 @@ class AsyncComputersResource(AsyncAPIResource):
396
400
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
397
401
  ) -> ComputerResponse:
398
402
  """
399
- Create a new browser or desktop automation session
403
+ Create a new browser or desktop automation session with configurable timeout.
404
+ Returns endpoints for executing actions, streaming events, and viewing
405
+ screencast.
400
406
 
401
407
  Args:
402
408
  display: TODO: implement
@@ -443,7 +449,7 @@ class AsyncComputersResource(AsyncAPIResource):
443
449
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
444
450
  ) -> ComputerResponse:
445
451
  """
446
- Get the current status of a computer instance
452
+ Get the current status and metadata of a computer instance
447
453
 
448
454
  Args:
449
455
  extra_headers: Send extra headers
@@ -496,7 +502,8 @@ class AsyncComputersResource(AsyncAPIResource):
496
502
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
497
503
  ) -> ActionResult:
498
504
  """
499
- Execute a single action (screenshot, click, type, navigate, )
505
+ Execute a single action such as screenshot, click, type, navigate, scroll, debug
506
+ or other computer use actions
500
507
 
501
508
  Args:
502
509
  extra_headers: Send extra headers
@@ -565,7 +572,7 @@ class AsyncComputersResource(AsyncAPIResource):
565
572
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
566
573
  ) -> ComputerKeepAliveResponse:
567
574
  """
568
- Extend the timeout for a computer session
575
+ Extend the timeout for a computer session and verify it is still running
569
576
 
570
577
  Args:
571
578
  extra_headers: Send extra headers
@@ -667,7 +674,8 @@ class AsyncComputersResource(AsyncAPIResource):
667
674
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
668
675
  ) -> None:
669
676
  """
670
- Terminate and clean up a computer instance
677
+ Terminate and clean up a computer instance, stopping the session and recording
678
+ metrics
671
679
 
672
680
  Args:
673
681
  extra_headers: Send extra headers
@@ -10,6 +10,8 @@ __all__ = ["ActionResult"]
10
10
  class ActionResult(BaseModel):
11
11
  error_message: Optional[str] = None
12
12
 
13
+ request_id: Optional[str] = None
14
+
13
15
  result: Optional[Dict[str, object]] = None
14
16
 
15
17
  status: Optional[str] = None
@@ -1,3 +0,0 @@
1
- {
2
- ".": "2.0.1"
3
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes