tzafon 1.3.2__py3-none-any.whl → 1.4.0__py3-none-any.whl
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/_client.py +6 -6
- tzafon/_version.py +1 -1
- {tzafon-1.3.2.dist-info → tzafon-1.4.0.dist-info}/METADATA +5 -5
- {tzafon-1.3.2.dist-info → tzafon-1.4.0.dist-info}/RECORD +6 -6
- {tzafon-1.3.2.dist-info → tzafon-1.4.0.dist-info}/WHEEL +0 -0
- {tzafon-1.3.2.dist-info → tzafon-1.4.0.dist-info}/licenses/LICENSE +0 -0
tzafon/_client.py
CHANGED
|
@@ -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
|
|
tzafon/_version.py
CHANGED
|
@@ -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
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
tzafon/__init__.py,sha256=V5qEHakTu5iq2ShF_TOZHw4io0UXcTp3_AQBqRpMO48,3251
|
|
2
2
|
tzafon/_base_client.py,sha256=5AX9s8UF-0wXUI15A1uiRcWhTNk_I4UBpt0Q-2r0aLU,67047
|
|
3
|
-
tzafon/_client.py,sha256=
|
|
3
|
+
tzafon/_client.py,sha256=EbENZoqN6ERd3PSISUi0jGCdmxC_5-P8sONVbZaqR9w,15066
|
|
4
4
|
tzafon/_compat.py,sha256=DQBVORjFb33zch24jzkhM14msvnzY7mmSmgDLaVFUM8,6562
|
|
5
5
|
tzafon/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
|
6
6
|
tzafon/_exceptions.py,sha256=qi7R0qNzTGtKBt4fWynaQkMnUk3YGrIp01jis82aEdo,3224
|
|
@@ -11,7 +11,7 @@ tzafon/_resource.py,sha256=EseuwN0R4kKBVcQnyF4NgCeRtc6-OrR8yWVI5fOYGHM,1112
|
|
|
11
11
|
tzafon/_response.py,sha256=Gaq-HHLZ76rKv515pCAMkfW4rbz_ManOH-7R640hrDE,28792
|
|
12
12
|
tzafon/_streaming.py,sha256=SavIdu5Tnaelw60s19mwFijhkdhdxh1fDqZ1AoIwC0g,10108
|
|
13
13
|
tzafon/_types.py,sha256=1kStHPi-XwmomGBE0xKVtz0mdRF4Svxb8NWZR4FaSiY,7236
|
|
14
|
-
tzafon/_version.py,sha256=
|
|
14
|
+
tzafon/_version.py,sha256=iQiubfCSrqbBxAeb4F9zNHDDpkgEuVobKfZWVuACOrs,158
|
|
15
15
|
tzafon/batch_wrapper.py,sha256=ESJGxScFZzdPwDTiCjCz6-QRsoB-_nxoZuHbN9HKbUE,3509
|
|
16
16
|
tzafon/client_extensions.py,sha256=Tn3SkDYNl0B8M3U8eE39KNLsazKpbztAQSmBVVmzgCQ,1964
|
|
17
17
|
tzafon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -40,7 +40,7 @@ tzafon/types/computer_keep_alive_response.py,sha256=H75ugeXG2CetcGgwwKE_cYmr_ujD
|
|
|
40
40
|
tzafon/types/computer_list_response.py,sha256=ABykSdzQgm_bNISk_F7GQaXWRB3WidA9tXuMjmNWZps,294
|
|
41
41
|
tzafon/types/computer_navigate_params.py,sha256=mK4JWt0fqafLuoXHdOh_I6j-hJY0Ub0nAUkadA20v38,294
|
|
42
42
|
tzafon/types/computer_response.py,sha256=agc6iysQzQR22edcoz84CuUpzQ7WLwsxEuo8ccwIbYc,404
|
|
43
|
-
tzafon-1.
|
|
44
|
-
tzafon-1.
|
|
45
|
-
tzafon-1.
|
|
46
|
-
tzafon-1.
|
|
43
|
+
tzafon-1.4.0.dist-info/METADATA,sha256=OWyl374RBvhlhT84mf7NBgAXotNqBd3fYv-wSVL4wlc,13983
|
|
44
|
+
tzafon-1.4.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
45
|
+
tzafon-1.4.0.dist-info/licenses/LICENSE,sha256=ciLXi9zfEehb4Tnhy-M9I2WSRUpZjx-FK1TEChVqlDo,1048
|
|
46
|
+
tzafon-1.4.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|