anchorbrowser 0.3.0__py3-none-any.whl → 0.3.1__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.
- anchorbrowser/_version.py +1 -1
- {anchorbrowser-0.3.0.dist-info → anchorbrowser-0.3.1.dist-info}/METADATA +26 -22
- {anchorbrowser-0.3.0.dist-info → anchorbrowser-0.3.1.dist-info}/RECORD +5 -5
- {anchorbrowser-0.3.0.dist-info → anchorbrowser-0.3.1.dist-info}/WHEEL +0 -0
- {anchorbrowser-0.3.0.dist-info → anchorbrowser-0.3.1.dist-info}/licenses/LICENSE +0 -0
anchorbrowser/_version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: anchorbrowser
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: The official Python library for the anchorbrowser API
|
|
5
5
|
Project-URL: Homepage, https://github.com/anchorbrowser/AnchorBrowser-SDK-Python
|
|
6
6
|
Project-URL: Repository, https://github.com/anchorbrowser/AnchorBrowser-SDK-Python
|
|
@@ -68,10 +68,10 @@ client = Anchorbrowser(
|
|
|
68
68
|
api_key=os.environ.get("ANCHORBROWSER_API_KEY"), # This is the default and can be omitted
|
|
69
69
|
)
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
session = client.sessions.create(
|
|
72
|
+
session={"recording": {"active": False}},
|
|
73
73
|
)
|
|
74
|
-
print(
|
|
74
|
+
print(session.data)
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
While you can provide an `api_key` keyword argument,
|
|
@@ -94,10 +94,10 @@ client = AsyncAnchorbrowser(
|
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
async def main() -> None:
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
session = await client.sessions.create(
|
|
98
|
+
session={"recording": {"active": False}},
|
|
99
99
|
)
|
|
100
|
-
print(
|
|
100
|
+
print(session.data)
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
asyncio.run(main())
|
|
@@ -129,10 +129,10 @@ async def main() -> None:
|
|
|
129
129
|
api_key="Your API Key",
|
|
130
130
|
http_client=DefaultAioHttpClient(),
|
|
131
131
|
) as client:
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
session = await client.sessions.create(
|
|
133
|
+
session={"recording": {"active": False}},
|
|
134
134
|
)
|
|
135
|
-
print(
|
|
135
|
+
print(session.data)
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
asyncio.run(main())
|
|
@@ -196,8 +196,8 @@ from anchorbrowser import Anchorbrowser
|
|
|
196
196
|
client = Anchorbrowser()
|
|
197
197
|
|
|
198
198
|
try:
|
|
199
|
-
client.
|
|
200
|
-
|
|
199
|
+
client.sessions.create(
|
|
200
|
+
session={"recording": {"active": False}},
|
|
201
201
|
)
|
|
202
202
|
except anchorbrowser.APIConnectionError as e:
|
|
203
203
|
print("The server could not be reached")
|
|
@@ -241,8 +241,8 @@ client = Anchorbrowser(
|
|
|
241
241
|
)
|
|
242
242
|
|
|
243
243
|
# Or, configure per-request:
|
|
244
|
-
client.with_options(max_retries=5).
|
|
245
|
-
|
|
244
|
+
client.with_options(max_retries=5).sessions.create(
|
|
245
|
+
session={"recording": {"active": False}},
|
|
246
246
|
)
|
|
247
247
|
```
|
|
248
248
|
|
|
@@ -266,8 +266,8 @@ client = Anchorbrowser(
|
|
|
266
266
|
)
|
|
267
267
|
|
|
268
268
|
# Override per-request:
|
|
269
|
-
client.with_options(timeout=5.0).
|
|
270
|
-
|
|
269
|
+
client.with_options(timeout=5.0).sessions.create(
|
|
270
|
+
session={"recording": {"active": False}},
|
|
271
271
|
)
|
|
272
272
|
```
|
|
273
273
|
|
|
@@ -309,13 +309,17 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
|
309
309
|
from anchorbrowser import Anchorbrowser
|
|
310
310
|
|
|
311
311
|
client = Anchorbrowser()
|
|
312
|
-
response = client.
|
|
313
|
-
|
|
312
|
+
response = client.sessions.with_raw_response.create(
|
|
313
|
+
session={
|
|
314
|
+
"recording": {
|
|
315
|
+
"active": False
|
|
316
|
+
}
|
|
317
|
+
},
|
|
314
318
|
)
|
|
315
319
|
print(response.headers.get('X-My-Header'))
|
|
316
320
|
|
|
317
|
-
|
|
318
|
-
print(
|
|
321
|
+
session = response.parse() # get the object that `sessions.create()` would have returned
|
|
322
|
+
print(session.data)
|
|
319
323
|
```
|
|
320
324
|
|
|
321
325
|
These methods return an [`APIResponse`](https://github.com/anchorbrowser/AnchorBrowser-SDK-Python/tree/main/src/anchorbrowser/_response.py) object.
|
|
@@ -329,8 +333,8 @@ The above interface eagerly reads the full response body when you make the reque
|
|
|
329
333
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
|
330
334
|
|
|
331
335
|
```python
|
|
332
|
-
with client.
|
|
333
|
-
|
|
336
|
+
with client.sessions.with_streaming_response.create(
|
|
337
|
+
session={"recording": {"active": False}},
|
|
334
338
|
) as response:
|
|
335
339
|
print(response.headers.get("X-My-Header"))
|
|
336
340
|
|
|
@@ -11,7 +11,7 @@ anchorbrowser/_resource.py,sha256=7lE1EgpVj5kwckk-27umtigTOf9nKTyRl97cgNwRbRQ,11
|
|
|
11
11
|
anchorbrowser/_response.py,sha256=xsiyWOC8LWW-NvbFtZ-MJD4f7eI9RnivKwtKImZ-8o4,28860
|
|
12
12
|
anchorbrowser/_streaming.py,sha256=9uTovnqQkz3LRbIWe9fSWwzB_aI1cX14LvEuMhkEcDI,10128
|
|
13
13
|
anchorbrowser/_types.py,sha256=hYSr4gk9908ZiGTqMX3pHhdzfzUUaHVelFS_I6p2Uj0,7243
|
|
14
|
-
anchorbrowser/_version.py,sha256=
|
|
14
|
+
anchorbrowser/_version.py,sha256=E5jsc_pGjndIiuQseRZKAPyb0Grht0wYt2QiDmH_AiM,165
|
|
15
15
|
anchorbrowser/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
anchorbrowser/_utils/__init__.py,sha256=7fch0GT9zpNnErbciSpUNa-SjTxxjY6kxHxKMOM4AGs,2305
|
|
17
17
|
anchorbrowser/_utils/_compat.py,sha256=D8gtAvjJQrDWt9upS0XaG9Rr5l1QhiAx_I_1utT_tt0,1195
|
|
@@ -118,7 +118,7 @@ anchorbrowser/types/shared/success_response.py,sha256=l9OWrucXoSjBdsx5QKdvBPFtxv
|
|
|
118
118
|
anchorbrowser/types/task/__init__.py,sha256=CbGxF7UFks1LsFq_wdSi62f4bgThKymv5OOSDmaFBI4,267
|
|
119
119
|
anchorbrowser/types/task/run_execute_params.py,sha256=P-gRINLzKJ12Q03u7Pwu_6QJ8XFvyvAOVvguy03K98k,6680
|
|
120
120
|
anchorbrowser/types/task/run_execute_response.py,sha256=ha86lTlKsLA_yZlaHNHEqBM1F--GiOLuifZpAk9J1bM,794
|
|
121
|
-
anchorbrowser-0.3.
|
|
122
|
-
anchorbrowser-0.3.
|
|
123
|
-
anchorbrowser-0.3.
|
|
124
|
-
anchorbrowser-0.3.
|
|
121
|
+
anchorbrowser-0.3.1.dist-info/METADATA,sha256=GkFy6c1Joah6JaXTLuRKJuUuYgZosyykYJoAwsVC0Ho,15279
|
|
122
|
+
anchorbrowser-0.3.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
123
|
+
anchorbrowser-0.3.1.dist-info/licenses/LICENSE,sha256=QYTH6OztHxnELDn890vME8F7-euzmsHhWI4XOSYxwOg,11343
|
|
124
|
+
anchorbrowser-0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|