raccoonai 0.1.0a4__tar.gz → 0.1.0a5__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.
- raccoonai-0.1.0a5/.release-please-manifest.json +3 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/CHANGELOG.md +11 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/CONTRIBUTING.md +2 -2
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/PKG-INFO +13 -13
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/README.md +6 -6
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/pyproject.toml +4 -4
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_constants.py +4 -4
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_version.py +1 -1
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/resources/fleet.py +4 -4
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/resources/lam.py +4 -4
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/test_client.py +26 -26
- raccoonai-0.1.0a4/.release-please-manifest.json +0 -3
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/.gitignore +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/LICENSE +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/SECURITY.md +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/api.md +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/bin/check-release-environment +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/bin/publish-pypi +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/examples/.keep +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/mypy.ini +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/noxfile.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/release-please-config.json +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/requirements-dev.lock +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/requirements.lock +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/__init__.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_base_client.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_client.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_compat.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_exceptions.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_files.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_models.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_qs.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_resource.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_response.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_streaming.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_types.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_utils/__init__.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_utils/_logs.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_utils/_proxy.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_utils/_reflection.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_utils/_streams.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_utils/_sync.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_utils/_transform.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_utils/_typing.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/_utils/_utils.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/lib/.keep +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/py.typed +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/resources/__init__.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/types/__init__.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/types/fleet_create_params.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/types/fleet_create_response.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/types/fleet_logs_response.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/types/fleet_status_response.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/types/fleet_terminate_response.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/types/lam_extract_params.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/types/lam_extract_response.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/types/lam_integration_run_params.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/types/lam_integration_run_response.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/types/lam_run_params.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/src/raccoonai/types/lam_run_response.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/__init__.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/api_resources/__init__.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/api_resources/test_fleet.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/api_resources/test_lam.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/conftest.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/sample_file.txt +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/test_deepcopy.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/test_extract_files.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/test_files.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/test_models.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/test_qs.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/test_required_args.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/test_response.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/test_streaming.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/test_transform.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/test_utils/test_proxy.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/test_utils/test_typing.py +0 -0
- {raccoonai-0.1.0a4 → raccoonai-0.1.0a5}/tests/utils.py +0 -0
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.5 (2025-02-20)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/raccoonaihq/raccoonai-python/compare/v0.1.0-alpha.4...v0.1.0-alpha.5)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([#22](https://github.com/raccoonaihq/raccoonai-python/issues/22)) ([cc6e554](https://github.com/raccoonaihq/raccoonai-python/commit/cc6e55441b2f704061e3a83573e4fc74503c8a68))
|
|
10
|
+
* **client:** increase initial delay in retries to 1 sec ([#21](https://github.com/raccoonaihq/raccoonai-python/issues/21)) ([7db68d9](https://github.com/raccoonaihq/raccoonai-python/commit/7db68d9a20f316e75c35cefdabb24856435c34cf))
|
|
11
|
+
* **client:** set default_timeout to 10 minutes and max_retries to 0 ([#18](https://github.com/raccoonaihq/raccoonai-python/issues/18)) ([51cc5e4](https://github.com/raccoonaihq/raccoonai-python/commit/51cc5e441b12bef5f11d7e942c2ce276f1fe71a0))
|
|
12
|
+
* **config:** update github org name ([#19](https://github.com/raccoonaihq/raccoonai-python/issues/19)) ([de5f0e1](https://github.com/raccoonaihq/raccoonai-python/commit/de5f0e128512d004b0e945e0b8a4c280bffe411b))
|
|
13
|
+
|
|
3
14
|
## 0.1.0-alpha.4 (2025-02-14)
|
|
4
15
|
|
|
5
16
|
Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/flyingraccoonai/raccoonai-python/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)
|
|
@@ -63,7 +63,7 @@ If you’d like to use the repository from source, you can either install from g
|
|
|
63
63
|
To install via git:
|
|
64
64
|
|
|
65
65
|
```sh
|
|
66
|
-
$ pip install git+ssh://git@github.com/
|
|
66
|
+
$ pip install git+ssh://git@github.com/raccoonaihq/raccoonai-python.git
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Alternatively, you can build from source and install the wheel file:
|
|
@@ -121,7 +121,7 @@ the changes aren't made through the automated pipeline, you may want to make rel
|
|
|
121
121
|
|
|
122
122
|
### Publish with a GitHub workflow
|
|
123
123
|
|
|
124
|
-
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/
|
|
124
|
+
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/raccoonaihq/raccoonai-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
|
|
125
125
|
|
|
126
126
|
### Publish manually
|
|
127
127
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: raccoonai
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a5
|
|
4
4
|
Summary: The official Python library for the raccoonAI API
|
|
5
|
-
Project-URL: Homepage, https://github.com/
|
|
6
|
-
Project-URL: Repository, https://github.com/
|
|
5
|
+
Project-URL: Homepage, https://github.com/raccoonaihq/raccoonai-python
|
|
6
|
+
Project-URL: Repository, https://github.com/raccoonaihq/raccoonai-python
|
|
7
7
|
Author-email: Raccoon AI <team@flyingraccoon.tech>
|
|
8
8
|
License-Expression: Apache-2.0
|
|
9
9
|
License-File: LICENSE
|
|
@@ -42,7 +42,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/).
|
|
|
42
42
|
|
|
43
43
|
## Documentation
|
|
44
44
|
|
|
45
|
-
The REST API documentation can be found on [docs.flyingraccoon.tech](https://docs.flyingraccoon.tech). The full API of this library can be found in [api.md](https://github.com/
|
|
45
|
+
The REST API documentation can be found on [docs.flyingraccoon.tech](https://docs.flyingraccoon.tech). The full API of this library can be found in [api.md](https://github.com/raccoonaihq/raccoonai-python/tree/main/api.md).
|
|
46
46
|
|
|
47
47
|
## Installation
|
|
48
48
|
|
|
@@ -53,7 +53,7 @@ pip install --pre raccoonai
|
|
|
53
53
|
|
|
54
54
|
## Usage
|
|
55
55
|
|
|
56
|
-
The full API of this library can be found in [api.md](https://github.com/
|
|
56
|
+
The full API of this library can be found in [api.md](https://github.com/raccoonaihq/raccoonai-python/tree/main/api.md).
|
|
57
57
|
|
|
58
58
|
```python
|
|
59
59
|
import os
|
|
@@ -195,7 +195,7 @@ Error codes are as follows:
|
|
|
195
195
|
|
|
196
196
|
### Retries
|
|
197
197
|
|
|
198
|
-
Certain errors are automatically retried
|
|
198
|
+
Certain errors are automatically retried 0 times by default, with a short exponential backoff.
|
|
199
199
|
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
|
200
200
|
429 Rate Limit, and >=500 Internal errors are all retried by default.
|
|
201
201
|
|
|
@@ -219,7 +219,7 @@ client.with_options(max_retries=5).lam.run(
|
|
|
219
219
|
|
|
220
220
|
### Timeouts
|
|
221
221
|
|
|
222
|
-
By default requests time out after
|
|
222
|
+
By default requests time out after 10 minutes. You can configure this with a `timeout` option,
|
|
223
223
|
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
|
|
224
224
|
|
|
225
225
|
```python
|
|
@@ -227,7 +227,7 @@ from raccoonai import RaccoonAI
|
|
|
227
227
|
|
|
228
228
|
# Configure the default for all requests:
|
|
229
229
|
client = RaccoonAI(
|
|
230
|
-
# 20 seconds (default is
|
|
230
|
+
# 20 seconds (default is 10 minutes)
|
|
231
231
|
timeout=20.0,
|
|
232
232
|
)
|
|
233
233
|
|
|
@@ -245,7 +245,7 @@ client.with_options(timeout=5.0).lam.run(
|
|
|
245
245
|
|
|
246
246
|
On timeout, an `APITimeoutError` is thrown.
|
|
247
247
|
|
|
248
|
-
Note that requests that time out are [retried twice by default](https://github.com/
|
|
248
|
+
Note that requests that time out are [retried twice by default](https://github.com/raccoonaihq/raccoonai-python/tree/main/#retries).
|
|
249
249
|
|
|
250
250
|
## Advanced
|
|
251
251
|
|
|
@@ -291,9 +291,9 @@ lam = response.parse() # get the object that `lam.run()` would have returned
|
|
|
291
291
|
print(lam.livestream_url)
|
|
292
292
|
```
|
|
293
293
|
|
|
294
|
-
These methods return an [`APIResponse`](https://github.com/
|
|
294
|
+
These methods return an [`APIResponse`](https://github.com/raccoonaihq/raccoonai-python/tree/main/src/raccoonai/_response.py) object.
|
|
295
295
|
|
|
296
|
-
The async client returns an [`AsyncAPIResponse`](https://github.com/
|
|
296
|
+
The async client returns an [`AsyncAPIResponse`](https://github.com/raccoonaihq/raccoonai-python/tree/main/src/raccoonai/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
|
|
297
297
|
|
|
298
298
|
#### `.with_streaming_response`
|
|
299
299
|
|
|
@@ -400,7 +400,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
|
|
|
400
400
|
|
|
401
401
|
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
402
402
|
|
|
403
|
-
We are keen for your feedback; please open an [issue](https://www.github.com/
|
|
403
|
+
We are keen for your feedback; please open an [issue](https://www.github.com/raccoonaihq/raccoonai-python/issues) with questions, bugs, or suggestions.
|
|
404
404
|
|
|
405
405
|
### Determining the installed version
|
|
406
406
|
|
|
@@ -419,4 +419,4 @@ Python 3.8 or higher.
|
|
|
419
419
|
|
|
420
420
|
## Contributing
|
|
421
421
|
|
|
422
|
-
See [the contributing documentation](https://github.com/
|
|
422
|
+
See [the contributing documentation](https://github.com/raccoonaihq/raccoonai-python/tree/main/./CONTRIBUTING.md).
|
|
@@ -163,7 +163,7 @@ Error codes are as follows:
|
|
|
163
163
|
|
|
164
164
|
### Retries
|
|
165
165
|
|
|
166
|
-
Certain errors are automatically retried
|
|
166
|
+
Certain errors are automatically retried 0 times by default, with a short exponential backoff.
|
|
167
167
|
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
|
168
168
|
429 Rate Limit, and >=500 Internal errors are all retried by default.
|
|
169
169
|
|
|
@@ -187,7 +187,7 @@ client.with_options(max_retries=5).lam.run(
|
|
|
187
187
|
|
|
188
188
|
### Timeouts
|
|
189
189
|
|
|
190
|
-
By default requests time out after
|
|
190
|
+
By default requests time out after 10 minutes. You can configure this with a `timeout` option,
|
|
191
191
|
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
|
|
192
192
|
|
|
193
193
|
```python
|
|
@@ -195,7 +195,7 @@ from raccoonai import RaccoonAI
|
|
|
195
195
|
|
|
196
196
|
# Configure the default for all requests:
|
|
197
197
|
client = RaccoonAI(
|
|
198
|
-
# 20 seconds (default is
|
|
198
|
+
# 20 seconds (default is 10 minutes)
|
|
199
199
|
timeout=20.0,
|
|
200
200
|
)
|
|
201
201
|
|
|
@@ -259,9 +259,9 @@ lam = response.parse() # get the object that `lam.run()` would have returned
|
|
|
259
259
|
print(lam.livestream_url)
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
-
These methods return an [`APIResponse`](https://github.com/
|
|
262
|
+
These methods return an [`APIResponse`](https://github.com/raccoonaihq/raccoonai-python/tree/main/src/raccoonai/_response.py) object.
|
|
263
263
|
|
|
264
|
-
The async client returns an [`AsyncAPIResponse`](https://github.com/
|
|
264
|
+
The async client returns an [`AsyncAPIResponse`](https://github.com/raccoonaihq/raccoonai-python/tree/main/src/raccoonai/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
|
|
265
265
|
|
|
266
266
|
#### `.with_streaming_response`
|
|
267
267
|
|
|
@@ -368,7 +368,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
|
|
|
368
368
|
|
|
369
369
|
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
370
370
|
|
|
371
|
-
We are keen for your feedback; please open an [issue](https://www.github.com/
|
|
371
|
+
We are keen for your feedback; please open an [issue](https://www.github.com/raccoonaihq/raccoonai-python/issues) with questions, bugs, or suggestions.
|
|
372
372
|
|
|
373
373
|
### Determining the installed version
|
|
374
374
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "raccoonai"
|
|
3
|
-
version = "0.1.0-alpha.
|
|
3
|
+
version = "0.1.0-alpha.5"
|
|
4
4
|
description = "The official Python library for the raccoonAI API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -34,8 +34,8 @@ classifiers = [
|
|
|
34
34
|
]
|
|
35
35
|
|
|
36
36
|
[project.urls]
|
|
37
|
-
Homepage = "https://github.com/
|
|
38
|
-
Repository = "https://github.com/
|
|
37
|
+
Homepage = "https://github.com/raccoonaihq/raccoonai-python"
|
|
38
|
+
Repository = "https://github.com/raccoonaihq/raccoonai-python"
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
@@ -122,7 +122,7 @@ path = "README.md"
|
|
|
122
122
|
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
|
|
123
123
|
# replace relative links with absolute links
|
|
124
124
|
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
|
|
125
|
-
replacement = '[\1](https://github.com/
|
|
125
|
+
replacement = '[\1](https://github.com/raccoonaihq/raccoonai-python/tree/main/\g<2>)'
|
|
126
126
|
|
|
127
127
|
[tool.pytest.ini_options]
|
|
128
128
|
testpaths = ["tests"]
|
|
@@ -5,10 +5,10 @@ import httpx
|
|
|
5
5
|
RAW_RESPONSE_HEADER = "X-Stainless-Raw-Response"
|
|
6
6
|
OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to"
|
|
7
7
|
|
|
8
|
-
# default timeout is
|
|
9
|
-
DEFAULT_TIMEOUT = httpx.Timeout(timeout=
|
|
10
|
-
DEFAULT_MAX_RETRIES =
|
|
8
|
+
# default timeout is 10 minutes
|
|
9
|
+
DEFAULT_TIMEOUT = httpx.Timeout(timeout=600, connect=5.0)
|
|
10
|
+
DEFAULT_MAX_RETRIES = 0
|
|
11
11
|
DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20)
|
|
12
12
|
|
|
13
|
-
INITIAL_RETRY_DELAY = 0
|
|
13
|
+
INITIAL_RETRY_DELAY = 1.0
|
|
14
14
|
MAX_RETRY_DELAY = 8.0
|
|
@@ -36,7 +36,7 @@ class FleetResource(SyncAPIResource):
|
|
|
36
36
|
This property can be used as a prefix for any HTTP method call to return
|
|
37
37
|
the raw response object instead of the parsed content.
|
|
38
38
|
|
|
39
|
-
For more information, see https://www.github.com/
|
|
39
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
40
40
|
"""
|
|
41
41
|
return FleetResourceWithRawResponse(self)
|
|
42
42
|
|
|
@@ -45,7 +45,7 @@ class FleetResource(SyncAPIResource):
|
|
|
45
45
|
"""
|
|
46
46
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
47
47
|
|
|
48
|
-
For more information, see https://www.github.com/
|
|
48
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
49
49
|
"""
|
|
50
50
|
return FleetResourceWithStreamingResponse(self)
|
|
51
51
|
|
|
@@ -228,7 +228,7 @@ class AsyncFleetResource(AsyncAPIResource):
|
|
|
228
228
|
This property can be used as a prefix for any HTTP method call to return
|
|
229
229
|
the raw response object instead of the parsed content.
|
|
230
230
|
|
|
231
|
-
For more information, see https://www.github.com/
|
|
231
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
232
232
|
"""
|
|
233
233
|
return AsyncFleetResourceWithRawResponse(self)
|
|
234
234
|
|
|
@@ -237,7 +237,7 @@ class AsyncFleetResource(AsyncAPIResource):
|
|
|
237
237
|
"""
|
|
238
238
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
239
239
|
|
|
240
|
-
For more information, see https://www.github.com/
|
|
240
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
241
241
|
"""
|
|
242
242
|
return AsyncFleetResourceWithStreamingResponse(self)
|
|
243
243
|
|
|
@@ -38,7 +38,7 @@ class LamResource(SyncAPIResource):
|
|
|
38
38
|
This property can be used as a prefix for any HTTP method call to return
|
|
39
39
|
the raw response object instead of the parsed content.
|
|
40
40
|
|
|
41
|
-
For more information, see https://www.github.com/
|
|
41
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
42
42
|
"""
|
|
43
43
|
return LamResourceWithRawResponse(self)
|
|
44
44
|
|
|
@@ -47,7 +47,7 @@ class LamResource(SyncAPIResource):
|
|
|
47
47
|
"""
|
|
48
48
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
49
49
|
|
|
50
|
-
For more information, see https://www.github.com/
|
|
50
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
51
51
|
"""
|
|
52
52
|
return LamResourceWithStreamingResponse(self)
|
|
53
53
|
|
|
@@ -615,7 +615,7 @@ class AsyncLamResource(AsyncAPIResource):
|
|
|
615
615
|
This property can be used as a prefix for any HTTP method call to return
|
|
616
616
|
the raw response object instead of the parsed content.
|
|
617
617
|
|
|
618
|
-
For more information, see https://www.github.com/
|
|
618
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#accessing-raw-response-data-eg-headers
|
|
619
619
|
"""
|
|
620
620
|
return AsyncLamResourceWithRawResponse(self)
|
|
621
621
|
|
|
@@ -624,7 +624,7 @@ class AsyncLamResource(AsyncAPIResource):
|
|
|
624
624
|
"""
|
|
625
625
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
626
626
|
|
|
627
|
-
For more information, see https://www.github.com/
|
|
627
|
+
For more information, see https://www.github.com/raccoonaihq/raccoonai-python#with_streaming_response
|
|
628
628
|
"""
|
|
629
629
|
return AsyncLamResourceWithStreamingResponse(self)
|
|
630
630
|
|
|
@@ -94,7 +94,7 @@ class TestRaccoonAI:
|
|
|
94
94
|
# options that have a default are overridden correctly
|
|
95
95
|
copied = self.client.copy(max_retries=7)
|
|
96
96
|
assert copied.max_retries == 7
|
|
97
|
-
assert self.client.max_retries ==
|
|
97
|
+
assert self.client.max_retries == 0
|
|
98
98
|
|
|
99
99
|
copied2 = copied.copy(max_retries=6)
|
|
100
100
|
assert copied2.max_retries == 6
|
|
@@ -708,20 +708,20 @@ class TestRaccoonAI:
|
|
|
708
708
|
"remaining_retries,retry_after,timeout",
|
|
709
709
|
[
|
|
710
710
|
[3, "20", 20],
|
|
711
|
-
[3, "0",
|
|
712
|
-
[3, "-10",
|
|
711
|
+
[3, "0", 1],
|
|
712
|
+
[3, "-10", 1],
|
|
713
713
|
[3, "60", 60],
|
|
714
|
-
[3, "61",
|
|
714
|
+
[3, "61", 1],
|
|
715
715
|
[3, "Fri, 29 Sep 2023 16:26:57 GMT", 20],
|
|
716
|
-
[3, "Fri, 29 Sep 2023 16:26:37 GMT",
|
|
717
|
-
[3, "Fri, 29 Sep 2023 16:26:27 GMT",
|
|
716
|
+
[3, "Fri, 29 Sep 2023 16:26:37 GMT", 1],
|
|
717
|
+
[3, "Fri, 29 Sep 2023 16:26:27 GMT", 1],
|
|
718
718
|
[3, "Fri, 29 Sep 2023 16:27:37 GMT", 60],
|
|
719
|
-
[3, "Fri, 29 Sep 2023 16:27:38 GMT",
|
|
720
|
-
[3, "99999999999999999999999999999999999",
|
|
721
|
-
[3, "Zun, 29 Sep 2023 16:26:27 GMT",
|
|
722
|
-
[3, "",
|
|
723
|
-
[2, "",
|
|
724
|
-
[1, "",
|
|
719
|
+
[3, "Fri, 29 Sep 2023 16:27:38 GMT", 1],
|
|
720
|
+
[3, "99999999999999999999999999999999999", 1],
|
|
721
|
+
[3, "Zun, 29 Sep 2023 16:26:27 GMT", 1],
|
|
722
|
+
[3, "", 1],
|
|
723
|
+
[2, "", 1 * 2.0],
|
|
724
|
+
[1, "", 1 * 4.0],
|
|
725
725
|
[-1100, "", 8], # test large number potentially overflowing
|
|
726
726
|
],
|
|
727
727
|
)
|
|
@@ -732,7 +732,7 @@ class TestRaccoonAI:
|
|
|
732
732
|
headers = httpx.Headers({"retry-after": retry_after})
|
|
733
733
|
options = FinalRequestOptions(method="get", url="/foo", max_retries=3)
|
|
734
734
|
calculated = client._calculate_retry_timeout(remaining_retries, options, headers)
|
|
735
|
-
assert calculated == pytest.approx(timeout,
|
|
735
|
+
assert calculated == pytest.approx(timeout, 1 * 0.875) # pyright: ignore[reportUnknownMemberType]
|
|
736
736
|
|
|
737
737
|
@mock.patch("raccoonai._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout)
|
|
738
738
|
@pytest.mark.respx(base_url=base_url)
|
|
@@ -907,7 +907,7 @@ class TestAsyncRaccoonAI:
|
|
|
907
907
|
# options that have a default are overridden correctly
|
|
908
908
|
copied = self.client.copy(max_retries=7)
|
|
909
909
|
assert copied.max_retries == 7
|
|
910
|
-
assert self.client.max_retries ==
|
|
910
|
+
assert self.client.max_retries == 0
|
|
911
911
|
|
|
912
912
|
copied2 = copied.copy(max_retries=6)
|
|
913
913
|
assert copied2.max_retries == 6
|
|
@@ -1524,20 +1524,20 @@ class TestAsyncRaccoonAI:
|
|
|
1524
1524
|
"remaining_retries,retry_after,timeout",
|
|
1525
1525
|
[
|
|
1526
1526
|
[3, "20", 20],
|
|
1527
|
-
[3, "0",
|
|
1528
|
-
[3, "-10",
|
|
1527
|
+
[3, "0", 1],
|
|
1528
|
+
[3, "-10", 1],
|
|
1529
1529
|
[3, "60", 60],
|
|
1530
|
-
[3, "61",
|
|
1530
|
+
[3, "61", 1],
|
|
1531
1531
|
[3, "Fri, 29 Sep 2023 16:26:57 GMT", 20],
|
|
1532
|
-
[3, "Fri, 29 Sep 2023 16:26:37 GMT",
|
|
1533
|
-
[3, "Fri, 29 Sep 2023 16:26:27 GMT",
|
|
1532
|
+
[3, "Fri, 29 Sep 2023 16:26:37 GMT", 1],
|
|
1533
|
+
[3, "Fri, 29 Sep 2023 16:26:27 GMT", 1],
|
|
1534
1534
|
[3, "Fri, 29 Sep 2023 16:27:37 GMT", 60],
|
|
1535
|
-
[3, "Fri, 29 Sep 2023 16:27:38 GMT",
|
|
1536
|
-
[3, "99999999999999999999999999999999999",
|
|
1537
|
-
[3, "Zun, 29 Sep 2023 16:26:27 GMT",
|
|
1538
|
-
[3, "",
|
|
1539
|
-
[2, "",
|
|
1540
|
-
[1, "",
|
|
1535
|
+
[3, "Fri, 29 Sep 2023 16:27:38 GMT", 1],
|
|
1536
|
+
[3, "99999999999999999999999999999999999", 1],
|
|
1537
|
+
[3, "Zun, 29 Sep 2023 16:26:27 GMT", 1],
|
|
1538
|
+
[3, "", 1],
|
|
1539
|
+
[2, "", 1 * 2.0],
|
|
1540
|
+
[1, "", 1 * 4.0],
|
|
1541
1541
|
[-1100, "", 8], # test large number potentially overflowing
|
|
1542
1542
|
],
|
|
1543
1543
|
)
|
|
@@ -1549,7 +1549,7 @@ class TestAsyncRaccoonAI:
|
|
|
1549
1549
|
headers = httpx.Headers({"retry-after": retry_after})
|
|
1550
1550
|
options = FinalRequestOptions(method="get", url="/foo", max_retries=3)
|
|
1551
1551
|
calculated = client._calculate_retry_timeout(remaining_retries, options, headers)
|
|
1552
|
-
assert calculated == pytest.approx(timeout,
|
|
1552
|
+
assert calculated == pytest.approx(timeout, 1 * 0.875) # pyright: ignore[reportUnknownMemberType]
|
|
1553
1553
|
|
|
1554
1554
|
@mock.patch("raccoonai._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout)
|
|
1555
1555
|
@pytest.mark.respx(base_url=base_url)
|
|
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
|