tzafon 1.3.2__tar.gz → 1.4.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.
- tzafon-1.4.0/.release-please-manifest.json +3 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/CHANGELOG.md +15 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/PKG-INFO +5 -5
- {tzafon-1.3.2 → tzafon-1.4.0}/README.md +3 -3
- {tzafon-1.3.2 → tzafon-1.4.0}/WRAPPER.md +1 -1
- {tzafon-1.3.2 → tzafon-1.4.0}/WRAPPER_FUNCTIONALITY.md +3 -3
- {tzafon-1.3.2 → tzafon-1.4.0}/pyproject.toml +6 -2
- {tzafon-1.3.2 → tzafon-1.4.0}/requirements-dev.lock +1 -1
- {tzafon-1.3.2 → tzafon-1.4.0}/requirements.lock +1 -1
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_client.py +6 -6
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_version.py +1 -1
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_client.py +2 -2
- tzafon-1.3.2/.release-please-manifest.json +0 -3
- {tzafon-1.3.2 → tzafon-1.4.0}/.gitignore +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/BATCH_API.md +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/CONTRIBUTING.md +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/LICENSE +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/SECURITY.md +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/api.md +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/bin/check-release-environment +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/bin/publish-pypi +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/examples/.keep +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/examples/batch_example.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/examples/batch_example_simple.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/examples/clean_api_example.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/noxfile.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/release-please-config.json +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/computer/lib/.keep +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/__init__.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_base_client.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_compat.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_constants.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_exceptions.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_files.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_models.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_qs.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_resource.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_response.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_streaming.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_types.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_utils/__init__.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_utils/_compat.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_utils/_datetime_parse.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_utils/_logs.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_utils/_proxy.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_utils/_reflection.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_utils/_resources_proxy.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_utils/_streams.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_utils/_sync.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_utils/_transform.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_utils/_typing.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/_utils/_utils.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/batch_wrapper.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/client_extensions.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/py.typed +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/resources/__init__.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/resources/computers.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/types/__init__.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/types/action_result.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/types/computer_create_params.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/types/computer_execute_action_params.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/types/computer_execute_batch_params.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/types/computer_execute_batch_response.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/types/computer_keep_alive_response.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/types/computer_list_response.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/types/computer_navigate_params.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/types/computer_response.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/src/tzafon/wrapper.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/__init__.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/api_resources/__init__.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/api_resources/test_computers.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/conftest.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/sample_file.txt +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_deepcopy.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_extract_files.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_files.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_models.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_qs.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_required_args.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_response.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_streaming.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_transform.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_utils/test_datetime_parse.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_utils/test_proxy.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/test_utils/test_typing.py +0 -0
- {tzafon-1.3.2 → tzafon-1.4.0}/tests/utils.py +0 -0
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.4.0 (2025-10-20)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.3.2...v1.4.0](https://github.com/atulgavandetzafon/computer-python/compare/v1.3.2...v1.4.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([6405afc](https://github.com/atulgavandetzafon/computer-python/commit/6405afc6031ccdc2e65dbd935d54c340c148a675))
|
|
10
|
+
* renamed api key ([6800a00](https://github.com/atulgavandetzafon/computer-python/commit/6800a0019d321a9bc121745b1b3f9697b52ac565))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Chores
|
|
14
|
+
|
|
15
|
+
* bump `httpx-aiohttp` version to 0.1.9 ([f5e4b7e](https://github.com/atulgavandetzafon/computer-python/commit/f5e4b7ed3a9a62190715a3e426e0c9cd430ad7d7))
|
|
16
|
+
* **internal:** detect missing future annotations with ruff ([3c69485](https://github.com/atulgavandetzafon/computer-python/commit/3c69485eb903332d717f99730319c50f9a6a5776))
|
|
17
|
+
|
|
3
18
|
## 1.3.2 (2025-10-08)
|
|
4
19
|
|
|
5
20
|
Full Changelog: [v1.3.1...v1.3.2](https://github.com/atulgavandetzafon/computer-python/compare/v1.3.1...v1.3.2)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: tzafon
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: The official Python library for the computer API
|
|
5
5
|
Project-URL: Homepage, https://github.com/stainless-sdks/computer-python
|
|
6
6
|
Project-URL: Repository, https://github.com/stainless-sdks/computer-python
|
|
@@ -30,7 +30,7 @@ Requires-Dist: sniffio
|
|
|
30
30
|
Requires-Dist: typing-extensions<5,>=4.10
|
|
31
31
|
Provides-Extra: aiohttp
|
|
32
32
|
Requires-Dist: aiohttp; extra == 'aiohttp'
|
|
33
|
-
Requires-Dist: httpx-aiohttp>=0.1.
|
|
33
|
+
Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
|
|
34
34
|
Description-Content-Type: text/markdown
|
|
35
35
|
|
|
36
36
|
# Computer Python API library
|
|
@@ -64,7 +64,7 @@ import os
|
|
|
64
64
|
from tzafon import Computer
|
|
65
65
|
|
|
66
66
|
client = Computer(
|
|
67
|
-
api_key=os.environ.get("
|
|
67
|
+
api_key=os.environ.get("TZAFON_API_KEY"), # This is the default and can be omitted
|
|
68
68
|
)
|
|
69
69
|
|
|
70
70
|
computer_response = client.computers.create(
|
|
@@ -75,7 +75,7 @@ print(computer_response.id)
|
|
|
75
75
|
|
|
76
76
|
While you can provide an `api_key` keyword argument,
|
|
77
77
|
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
|
|
78
|
-
to add `
|
|
78
|
+
to add `TZAFON_API_KEY="My API Key"` to your `.env` file
|
|
79
79
|
so that your API Key is not stored in source control.
|
|
80
80
|
|
|
81
81
|
## Async usage
|
|
@@ -88,7 +88,7 @@ import asyncio
|
|
|
88
88
|
from tzafon import AsyncComputer
|
|
89
89
|
|
|
90
90
|
client = AsyncComputer(
|
|
91
|
-
api_key=os.environ.get("
|
|
91
|
+
api_key=os.environ.get("TZAFON_API_KEY"), # This is the default and can be omitted
|
|
92
92
|
)
|
|
93
93
|
|
|
94
94
|
|
|
@@ -29,7 +29,7 @@ import os
|
|
|
29
29
|
from tzafon import Computer
|
|
30
30
|
|
|
31
31
|
client = Computer(
|
|
32
|
-
api_key=os.environ.get("
|
|
32
|
+
api_key=os.environ.get("TZAFON_API_KEY"), # This is the default and can be omitted
|
|
33
33
|
)
|
|
34
34
|
|
|
35
35
|
computer_response = client.computers.create(
|
|
@@ -40,7 +40,7 @@ print(computer_response.id)
|
|
|
40
40
|
|
|
41
41
|
While you can provide an `api_key` keyword argument,
|
|
42
42
|
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
|
|
43
|
-
to add `
|
|
43
|
+
to add `TZAFON_API_KEY="My API Key"` to your `.env` file
|
|
44
44
|
so that your API Key is not stored in source control.
|
|
45
45
|
|
|
46
46
|
## Async usage
|
|
@@ -53,7 +53,7 @@ import asyncio
|
|
|
53
53
|
from tzafon import AsyncComputer
|
|
54
54
|
|
|
55
55
|
client = AsyncComputer(
|
|
56
|
-
api_key=os.environ.get("
|
|
56
|
+
api_key=os.environ.get("TZAFON_API_KEY"), # This is the default and can be omitted
|
|
57
57
|
)
|
|
58
58
|
|
|
59
59
|
|
|
@@ -7,7 +7,7 @@ Simple OOP wrapper for browser automation.
|
|
|
7
7
|
```python
|
|
8
8
|
from tzafon import Computer
|
|
9
9
|
|
|
10
|
-
client = Computer() # Auto-reads
|
|
10
|
+
client = Computer() # Auto-reads TZAFON_API_KEY env var
|
|
11
11
|
|
|
12
12
|
with client.create(kind="browser") as computer:
|
|
13
13
|
computer.navigate("https://google.com")
|
|
@@ -33,7 +33,7 @@ client.computers.terminate(response.id)
|
|
|
33
33
|
```python
|
|
34
34
|
from tzafon import Computer
|
|
35
35
|
|
|
36
|
-
client = Computer() # Auto-reads
|
|
36
|
+
client = Computer() # Auto-reads TZAFON_API_KEY from env
|
|
37
37
|
|
|
38
38
|
# Context manager handles cleanup automatically
|
|
39
39
|
with client.create(kind="browser") as computer:
|
|
@@ -83,7 +83,7 @@ add_async_client_extensions(AsyncComputer)
|
|
|
83
83
|
```python
|
|
84
84
|
from tzafon import Computer
|
|
85
85
|
|
|
86
|
-
# Reads
|
|
86
|
+
# Reads TZAFON_API_KEY environment variable
|
|
87
87
|
client = Computer()
|
|
88
88
|
|
|
89
89
|
# Or pass explicitly
|
|
@@ -236,7 +236,7 @@ client.computers.terminate(response.id)
|
|
|
236
236
|
## Environment Setup
|
|
237
237
|
|
|
238
238
|
```bash
|
|
239
|
-
export
|
|
239
|
+
export TZAFON_API_KEY=wpk_QUCIth7oNvAei4hV2i1c9uDl5yLaVmRJ
|
|
240
240
|
```
|
|
241
241
|
|
|
242
242
|
## Testing
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "tzafon"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.4.0"
|
|
4
4
|
description = "The official Python library for the computer API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "MIT"
|
|
@@ -39,7 +39,7 @@ Homepage = "https://github.com/stainless-sdks/computer-python"
|
|
|
39
39
|
Repository = "https://github.com/stainless-sdks/computer-python"
|
|
40
40
|
|
|
41
41
|
[project.optional-dependencies]
|
|
42
|
-
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.
|
|
42
|
+
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
|
|
43
43
|
|
|
44
44
|
[tool.rye]
|
|
45
45
|
managed = true
|
|
@@ -228,6 +228,8 @@ select = [
|
|
|
228
228
|
"B",
|
|
229
229
|
# remove unused imports
|
|
230
230
|
"F401",
|
|
231
|
+
# check for missing future annotations
|
|
232
|
+
"FA102",
|
|
231
233
|
# bare except statements
|
|
232
234
|
"E722",
|
|
233
235
|
# unused arguments
|
|
@@ -250,6 +252,8 @@ unfixable = [
|
|
|
250
252
|
"T203",
|
|
251
253
|
]
|
|
252
254
|
|
|
255
|
+
extend-safe-fixes = ["FA102"]
|
|
256
|
+
|
|
253
257
|
[tool.ruff.lint.flake8-tidy-imports.banned-api]
|
|
254
258
|
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
|
|
255
259
|
|
|
@@ -75,13 +75,13 @@ class Computer(SyncAPIClient):
|
|
|
75
75
|
) -> None:
|
|
76
76
|
"""Construct a new synchronous Computer client instance.
|
|
77
77
|
|
|
78
|
-
This automatically infers the `api_key` argument from the `
|
|
78
|
+
This automatically infers the `api_key` argument from the `TZAFON_API_KEY` environment variable if it is not provided.
|
|
79
79
|
"""
|
|
80
80
|
if api_key is None:
|
|
81
|
-
api_key = os.environ.get("
|
|
81
|
+
api_key = os.environ.get("TZAFON_API_KEY")
|
|
82
82
|
if api_key is None:
|
|
83
83
|
raise ComputerError(
|
|
84
|
-
"The api_key client option must be set either by passing api_key to the client or by setting the
|
|
84
|
+
"The api_key client option must be set either by passing api_key to the client or by setting the TZAFON_API_KEY environment variable"
|
|
85
85
|
)
|
|
86
86
|
self.api_key = api_key
|
|
87
87
|
|
|
@@ -243,13 +243,13 @@ class AsyncComputer(AsyncAPIClient):
|
|
|
243
243
|
) -> None:
|
|
244
244
|
"""Construct a new async AsyncComputer client instance.
|
|
245
245
|
|
|
246
|
-
This automatically infers the `api_key` argument from the `
|
|
246
|
+
This automatically infers the `api_key` argument from the `TZAFON_API_KEY` environment variable if it is not provided.
|
|
247
247
|
"""
|
|
248
248
|
if api_key is None:
|
|
249
|
-
api_key = os.environ.get("
|
|
249
|
+
api_key = os.environ.get("TZAFON_API_KEY")
|
|
250
250
|
if api_key is None:
|
|
251
251
|
raise ComputerError(
|
|
252
|
-
"The api_key client option must be set either by passing api_key to the client or by setting the
|
|
252
|
+
"The api_key client option must be set either by passing api_key to the client or by setting the TZAFON_API_KEY environment variable"
|
|
253
253
|
)
|
|
254
254
|
self.api_key = api_key
|
|
255
255
|
|
|
@@ -342,7 +342,7 @@ class TestComputer:
|
|
|
342
342
|
assert request.headers.get("Authorization") == f"Bearer {api_key}"
|
|
343
343
|
|
|
344
344
|
with pytest.raises(ComputerError):
|
|
345
|
-
with update_env(**{"
|
|
345
|
+
with update_env(**{"TZAFON_API_KEY": Omit()}):
|
|
346
346
|
client2 = Computer(base_url=base_url, api_key=None, _strict_response_validation=True)
|
|
347
347
|
_ = client2
|
|
348
348
|
|
|
@@ -1143,7 +1143,7 @@ class TestAsyncComputer:
|
|
|
1143
1143
|
assert request.headers.get("Authorization") == f"Bearer {api_key}"
|
|
1144
1144
|
|
|
1145
1145
|
with pytest.raises(ComputerError):
|
|
1146
|
-
with update_env(**{"
|
|
1146
|
+
with update_env(**{"TZAFON_API_KEY": Omit()}):
|
|
1147
1147
|
client2 = AsyncComputer(base_url=base_url, api_key=None, _strict_response_validation=True)
|
|
1148
1148
|
_ = client2
|
|
1149
1149
|
|
|
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
|
|
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
|