raccoonai 0.1.0a17__tar.gz → 0.1.0a18__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.0a18/.release-please-manifest.json +3 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/CHANGELOG.md +30 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/CONTRIBUTING.md +1 -2
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/PKG-INFO +1 -2
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/README.md +0 -1
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/SECURITY.md +2 -2
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/api.md +1 -2
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/pyproject.toml +3 -2
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/requirements-dev.lock +4 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/__init__.py +5 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_base_client.py +22 -2
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_models.py +2 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_types.py +2 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_utils/_proxy.py +4 -1
- raccoonai-0.1.0a18/src/raccoonai/_utils/_resources_proxy.py +24 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_version.py +1 -1
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/conftest.py +2 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/test_client.py +100 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/test_utils/test_proxy.py +11 -0
- raccoonai-0.1.0a17/.release-please-manifest.json +0 -3
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/.gitignore +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/LICENSE +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/bin/check-release-environment +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/bin/publish-pypi +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/examples/.keep +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/mypy.ini +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/noxfile.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/release-please-config.json +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/requirements.lock +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_client.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_compat.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_constants.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_exceptions.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_files.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_qs.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_resource.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_streaming.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_utils/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_utils/_logs.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_utils/_reflection.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_utils/_streams.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_utils/_sync.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_utils/_transform.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_utils/_typing.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/_utils/_utils.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/lib/.keep +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/py.typed +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/resources/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/resources/fleet/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/resources/fleet/extensions.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/resources/fleet/fleet.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/resources/fleet/sessions.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/resources/lam/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/resources/lam/lam.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/resources/lam/tasks.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/resources/tail/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/resources/tail/apps.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/resources/tail/tail.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/resources/tail/users.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/extension_all_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/extension_get_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/extension_upload_params.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/extension_upload_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_all_params.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_all_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_create_params.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_create_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_logs_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_media_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_status_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_terminate_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/lam/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/lam/task_all_params.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/lam/task_all_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/lam/task_media_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/lam_run_params.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/lam_run_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/tail/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/tail/app_all_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/tail/app_linked_params.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/tail/app_linked_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/tail/user_all_params.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/tail/user_all_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/tail/user_create_params.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/tail/user_create_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/tail/user_status_params.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/tail/user_status_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/api_resources/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/api_resources/fleet/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/api_resources/fleet/test_extensions.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/api_resources/fleet/test_sessions.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/api_resources/lam/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/api_resources/lam/test_tasks.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/api_resources/tail/__init__.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/api_resources/tail/test_apps.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/api_resources/tail/test_users.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/api_resources/test_lam.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/sample_file.txt +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/test_deepcopy.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/test_extract_files.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/test_files.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/test_models.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/test_qs.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/test_required_args.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/test_response.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/test_streaming.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/test_transform.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/test_utils/test_typing.py +0 -0
- {raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/tests/utils.py +0 -0
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.18 (2025-06-17)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.17...v0.1.0-alpha.18](https://github.com/raccoonaihq/raccoonai-python/compare/v0.1.0-alpha.17...v0.1.0-alpha.18)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **client:** add follow_redirects request option ([ead1aa2](https://github.com/raccoonaihq/raccoonai-python/commit/ead1aa29c13d4f033a0168fdeacee20f85fc487a))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **client:** correctly parse binary response | stream ([5428452](https://github.com/raccoonaihq/raccoonai-python/commit/5428452fe2a72d1779f18dd5d94f05a790e5d374))
|
|
15
|
+
* **docs/api:** remove references to nonexistent types ([c914c59](https://github.com/raccoonaihq/raccoonai-python/commit/c914c596f8f1269d52ac9e733fe6c0687e48934a))
|
|
16
|
+
* **package:** support direct resource imports ([f3a27ab](https://github.com/raccoonaihq/raccoonai-python/commit/f3a27ab2bb0a836a24f096588509e295677723e3))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
|
|
21
|
+
* **ci:** enable for pull requests ([b9d4d4a](https://github.com/raccoonaihq/raccoonai-python/commit/b9d4d4ae8d0056704b3a3041d283e65d056709ba))
|
|
22
|
+
* **ci:** fix installation instructions ([a8ca3a5](https://github.com/raccoonaihq/raccoonai-python/commit/a8ca3a501421f8ff560aae6544327a17f737a3f2))
|
|
23
|
+
* **ci:** upload sdks to package manager ([180aa07](https://github.com/raccoonaihq/raccoonai-python/commit/180aa079b0dbe5d9ad507a90ecc86f300c647a7a))
|
|
24
|
+
* **docs:** grammar improvements ([3c7226c](https://github.com/raccoonaihq/raccoonai-python/commit/3c7226cab9643f76ff8478b53ac7e69c05e9a71f))
|
|
25
|
+
* **docs:** remove reference to rye shell ([fdf4e0a](https://github.com/raccoonaihq/raccoonai-python/commit/fdf4e0a89c78828f52bfd3a328b76c5c883eb4b9))
|
|
26
|
+
* **docs:** remove unnecessary param examples ([1e465a4](https://github.com/raccoonaihq/raccoonai-python/commit/1e465a444fdf34a1a55abd7cdb0558520985f701))
|
|
27
|
+
* **internal:** avoid errors for isinstance checks on proxies ([0e03ccf](https://github.com/raccoonaihq/raccoonai-python/commit/0e03ccf60cfcd90fdae07ffb27a83e7acb3455b4))
|
|
28
|
+
* **internal:** codegen related update ([8336f4c](https://github.com/raccoonaihq/raccoonai-python/commit/8336f4c7c9217951d908d9d4b201687bc1578a17))
|
|
29
|
+
* **internal:** update conftest.py ([07c3955](https://github.com/raccoonaihq/raccoonai-python/commit/07c39557bc235720039aab307764faa6bea099b2))
|
|
30
|
+
* **tests:** add tests for httpx client instantiation & proxies ([a9961c3](https://github.com/raccoonaihq/raccoonai-python/commit/a9961c3882797827f7d1b09a2b65f31ce2c7a1e4))
|
|
31
|
+
* **tests:** run tests in parallel ([781ba6d](https://github.com/raccoonaihq/raccoonai-python/commit/781ba6d84ce3459e44b7e56e89f091d9f7db53cc))
|
|
32
|
+
|
|
3
33
|
## 0.1.0-alpha.17 (2025-04-24)
|
|
4
34
|
|
|
5
35
|
Full Changelog: [v0.1.0-alpha.16...v0.1.0-alpha.17](https://github.com/raccoonaihq/raccoonai-python/compare/v0.1.0-alpha.16...v0.1.0-alpha.17)
|
|
@@ -17,8 +17,7 @@ $ rye sync --all-features
|
|
|
17
17
|
You can then run scripts using `rye run python script.py` or by activating the virtual environment:
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
|
-
|
|
21
|
-
# or manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work
|
|
20
|
+
# Activate the virtual environment - https://docs.python.org/3/library/venv.html#how-venvs-work
|
|
22
21
|
$ source .venv/bin/activate
|
|
23
22
|
|
|
24
23
|
# now you can omit the `rye run` prefix
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: raccoonai
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a18
|
|
4
4
|
Summary: The official Python library for the raccoonAI API
|
|
5
5
|
Project-URL: Homepage, https://github.com/raccoonaihq/raccoonai-python
|
|
6
6
|
Project-URL: Repository, https://github.com/raccoonaihq/raccoonai-python
|
|
@@ -162,7 +162,6 @@ response = client.lam.run(
|
|
|
162
162
|
raccoon_passcode="<end-user-raccoon-passcode>",
|
|
163
163
|
advanced={
|
|
164
164
|
"block_ads": True,
|
|
165
|
-
"extension_ids": ["df2399ea-a938-438f-9d4b-ef3bc95cf8af"],
|
|
166
165
|
"proxy": {
|
|
167
166
|
"city": "sanfrancisco",
|
|
168
167
|
"country": "us",
|
|
@@ -16,11 +16,11 @@ before making any information public.
|
|
|
16
16
|
## Reporting Non-SDK Related Security Issues
|
|
17
17
|
|
|
18
18
|
If you encounter security issues that are not directly related to SDKs but pertain to the services
|
|
19
|
-
or products provided by Raccoon AI please follow the respective company's security reporting guidelines.
|
|
19
|
+
or products provided by Raccoon AI, please follow the respective company's security reporting guidelines.
|
|
20
20
|
|
|
21
21
|
### Raccoon AI Terms and Policies
|
|
22
22
|
|
|
23
|
-
Please contact team@raccoonai.tech for any questions or concerns regarding security of our services.
|
|
23
|
+
Please contact team@raccoonai.tech for any questions or concerns regarding the security of our services.
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
@@ -84,7 +84,6 @@ Types:
|
|
|
84
84
|
|
|
85
85
|
```python
|
|
86
86
|
from raccoonai.types.fleet import (
|
|
87
|
-
ExtensionDeleteResponse,
|
|
88
87
|
ExtensionAllResponse,
|
|
89
88
|
ExtensionGetResponse,
|
|
90
89
|
ExtensionUploadResponse,
|
|
@@ -93,7 +92,7 @@ from raccoonai.types.fleet import (
|
|
|
93
92
|
|
|
94
93
|
Methods:
|
|
95
94
|
|
|
96
|
-
- <code title="delete /extensions/{extensionId}">client.fleet.extensions.<a href="./src/raccoonai/resources/fleet/extensions.py">delete</a>(extension_id) ->
|
|
95
|
+
- <code title="delete /extensions/{extensionId}">client.fleet.extensions.<a href="./src/raccoonai/resources/fleet/extensions.py">delete</a>(extension_id) -> object</code>
|
|
97
96
|
- <code title="get /extensions">client.fleet.extensions.<a href="./src/raccoonai/resources/fleet/extensions.py">all</a>() -> <a href="./src/raccoonai/types/fleet/extension_all_response.py">ExtensionAllResponse</a></code>
|
|
98
97
|
- <code title="get /extensions/{extensionId}">client.fleet.extensions.<a href="./src/raccoonai/resources/fleet/extensions.py">get</a>(extension_id) -> <a href="./src/raccoonai/types/fleet/extension_get_response.py">ExtensionGetResponse</a></code>
|
|
99
98
|
- <code title="post /extensions">client.fleet.extensions.<a href="./src/raccoonai/resources/fleet/extensions.py">upload</a>(\*\*<a href="src/raccoonai/types/fleet/extension_upload_params.py">params</a>) -> <a href="./src/raccoonai/types/fleet/extension_upload_response.py">ExtensionUploadResponse</a></code>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "raccoonai"
|
|
3
|
-
version = "0.1.0-alpha.
|
|
3
|
+
version = "0.1.0-alpha.18"
|
|
4
4
|
description = "The official Python library for the raccoonAI API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -54,6 +54,7 @@ dev-dependencies = [
|
|
|
54
54
|
"importlib-metadata>=6.7.0",
|
|
55
55
|
"rich>=13.7.1",
|
|
56
56
|
"nest_asyncio==1.6.0",
|
|
57
|
+
"pytest-xdist>=3.6.1",
|
|
57
58
|
]
|
|
58
59
|
|
|
59
60
|
[tool.rye.scripts]
|
|
@@ -125,7 +126,7 @@ replacement = '[\1](https://github.com/raccoonaihq/raccoonai-python/tree/main/\g
|
|
|
125
126
|
|
|
126
127
|
[tool.pytest.ini_options]
|
|
127
128
|
testpaths = ["tests"]
|
|
128
|
-
addopts = "--tb=short"
|
|
129
|
+
addopts = "--tb=short -n auto"
|
|
129
130
|
xfail_strict = true
|
|
130
131
|
asyncio_mode = "auto"
|
|
131
132
|
asyncio_default_fixture_loop_scope = "session"
|
|
@@ -30,6 +30,8 @@ distro==1.8.0
|
|
|
30
30
|
exceptiongroup==1.2.2
|
|
31
31
|
# via anyio
|
|
32
32
|
# via pytest
|
|
33
|
+
execnet==2.1.1
|
|
34
|
+
# via pytest-xdist
|
|
33
35
|
filelock==3.12.4
|
|
34
36
|
# via virtualenv
|
|
35
37
|
h11==0.14.0
|
|
@@ -72,7 +74,9 @@ pygments==2.18.0
|
|
|
72
74
|
pyright==1.1.399
|
|
73
75
|
pytest==8.3.3
|
|
74
76
|
# via pytest-asyncio
|
|
77
|
+
# via pytest-xdist
|
|
75
78
|
pytest-asyncio==0.24.0
|
|
79
|
+
pytest-xdist==3.7.0
|
|
76
80
|
python-dateutil==2.8.2
|
|
77
81
|
# via time-machine
|
|
78
82
|
pytz==2023.3.post1
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
import typing as _t
|
|
4
|
+
|
|
3
5
|
from . import types
|
|
4
6
|
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
|
|
5
7
|
from ._utils import file_from_path
|
|
@@ -80,6 +82,9 @@ __all__ = [
|
|
|
80
82
|
"DefaultAsyncHttpxClient",
|
|
81
83
|
]
|
|
82
84
|
|
|
85
|
+
if not _t.TYPE_CHECKING:
|
|
86
|
+
from ._utils._resources_proxy import resources as resources
|
|
87
|
+
|
|
83
88
|
_setup_logging()
|
|
84
89
|
|
|
85
90
|
# Update the __module__ attribute for exported symbols so that
|
|
@@ -960,6 +960,9 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
960
960
|
if self.custom_auth is not None:
|
|
961
961
|
kwargs["auth"] = self.custom_auth
|
|
962
962
|
|
|
963
|
+
if options.follow_redirects is not None:
|
|
964
|
+
kwargs["follow_redirects"] = options.follow_redirects
|
|
965
|
+
|
|
963
966
|
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
|
|
964
967
|
|
|
965
968
|
response = None
|
|
@@ -1068,7 +1071,14 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1068
1071
|
) -> ResponseT:
|
|
1069
1072
|
origin = get_origin(cast_to) or cast_to
|
|
1070
1073
|
|
|
1071
|
-
if
|
|
1074
|
+
if (
|
|
1075
|
+
inspect.isclass(origin)
|
|
1076
|
+
and issubclass(origin, BaseAPIResponse)
|
|
1077
|
+
# we only want to actually return the custom BaseAPIResponse class if we're
|
|
1078
|
+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
|
|
1079
|
+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
|
|
1080
|
+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
|
|
1081
|
+
):
|
|
1072
1082
|
if not issubclass(origin, APIResponse):
|
|
1073
1083
|
raise TypeError(f"API Response types must subclass {APIResponse}; Received {origin}")
|
|
1074
1084
|
|
|
@@ -1460,6 +1470,9 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1460
1470
|
if self.custom_auth is not None:
|
|
1461
1471
|
kwargs["auth"] = self.custom_auth
|
|
1462
1472
|
|
|
1473
|
+
if options.follow_redirects is not None:
|
|
1474
|
+
kwargs["follow_redirects"] = options.follow_redirects
|
|
1475
|
+
|
|
1463
1476
|
log.debug("Sending HTTP Request: %s %s", request.method, request.url)
|
|
1464
1477
|
|
|
1465
1478
|
response = None
|
|
@@ -1568,7 +1581,14 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1568
1581
|
) -> ResponseT:
|
|
1569
1582
|
origin = get_origin(cast_to) or cast_to
|
|
1570
1583
|
|
|
1571
|
-
if
|
|
1584
|
+
if (
|
|
1585
|
+
inspect.isclass(origin)
|
|
1586
|
+
and issubclass(origin, BaseAPIResponse)
|
|
1587
|
+
# we only want to actually return the custom BaseAPIResponse class if we're
|
|
1588
|
+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
|
|
1589
|
+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
|
|
1590
|
+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
|
|
1591
|
+
):
|
|
1572
1592
|
if not issubclass(origin, AsyncAPIResponse):
|
|
1573
1593
|
raise TypeError(f"API Response types must subclass {AsyncAPIResponse}; Received {origin}")
|
|
1574
1594
|
|
|
@@ -737,6 +737,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
|
|
|
737
737
|
idempotency_key: str
|
|
738
738
|
json_data: Body
|
|
739
739
|
extra_json: AnyMapping
|
|
740
|
+
follow_redirects: bool
|
|
740
741
|
|
|
741
742
|
|
|
742
743
|
@final
|
|
@@ -750,6 +751,7 @@ class FinalRequestOptions(pydantic.BaseModel):
|
|
|
750
751
|
files: Union[HttpxRequestFiles, None] = None
|
|
751
752
|
idempotency_key: Union[str, None] = None
|
|
752
753
|
post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
|
|
754
|
+
follow_redirects: Union[bool, None] = None
|
|
753
755
|
|
|
754
756
|
# It should be noted that we cannot use `json` here as that would override
|
|
755
757
|
# a BaseModel method in an incompatible fashion.
|
|
@@ -100,6 +100,7 @@ class RequestOptions(TypedDict, total=False):
|
|
|
100
100
|
params: Query
|
|
101
101
|
extra_json: AnyMapping
|
|
102
102
|
idempotency_key: str
|
|
103
|
+
follow_redirects: bool
|
|
103
104
|
|
|
104
105
|
|
|
105
106
|
# Sentinel class used until PEP 0661 is accepted
|
|
@@ -215,3 +216,4 @@ class _GenericAlias(Protocol):
|
|
|
215
216
|
|
|
216
217
|
class HttpxSendArgs(TypedDict, total=False):
|
|
217
218
|
auth: httpx.Auth
|
|
219
|
+
follow_redirects: bool
|
|
@@ -46,7 +46,10 @@ class LazyProxy(Generic[T], ABC):
|
|
|
46
46
|
@property # type: ignore
|
|
47
47
|
@override
|
|
48
48
|
def __class__(self) -> type: # pyright: ignore
|
|
49
|
-
|
|
49
|
+
try:
|
|
50
|
+
proxied = self.__get_proxied__()
|
|
51
|
+
except Exception:
|
|
52
|
+
return type(self)
|
|
50
53
|
if issubclass(type(proxied), LazyProxy):
|
|
51
54
|
return type(proxied)
|
|
52
55
|
return proxied.__class__
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
from typing_extensions import override
|
|
5
|
+
|
|
6
|
+
from ._proxy import LazyProxy
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ResourcesProxy(LazyProxy[Any]):
|
|
10
|
+
"""A proxy for the `raccoonai.resources` module.
|
|
11
|
+
|
|
12
|
+
This is used so that we can lazily import `raccoonai.resources` only when
|
|
13
|
+
needed *and* so that users can just import `raccoonai` and reference `raccoonai.resources`
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
@override
|
|
17
|
+
def __load__(self) -> Any:
|
|
18
|
+
import importlib
|
|
19
|
+
|
|
20
|
+
mod = importlib.import_module("raccoonai.resources")
|
|
21
|
+
return mod
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
resources = ResourcesProxy().__as_proxied__()
|
|
@@ -31,6 +31,8 @@ from raccoonai._base_client import (
|
|
|
31
31
|
DEFAULT_TIMEOUT,
|
|
32
32
|
HTTPX_DEFAULT_TIMEOUT,
|
|
33
33
|
BaseClient,
|
|
34
|
+
DefaultHttpxClient,
|
|
35
|
+
DefaultAsyncHttpxClient,
|
|
34
36
|
make_request_options,
|
|
35
37
|
)
|
|
36
38
|
from raccoonai.types.lam_run_params import LamRunParamsNonStreaming
|
|
@@ -869,6 +871,55 @@ class TestRaccoonAI:
|
|
|
869
871
|
|
|
870
872
|
assert response.http_request.headers.get("x-stainless-retry-count") == "42"
|
|
871
873
|
|
|
874
|
+
def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
|
|
875
|
+
# Test that the proxy environment variables are set correctly
|
|
876
|
+
monkeypatch.setenv("HTTPS_PROXY", "https://example.org")
|
|
877
|
+
|
|
878
|
+
client = DefaultHttpxClient()
|
|
879
|
+
|
|
880
|
+
mounts = tuple(client._mounts.items())
|
|
881
|
+
assert len(mounts) == 1
|
|
882
|
+
assert mounts[0][0].pattern == "https://"
|
|
883
|
+
|
|
884
|
+
@pytest.mark.filterwarnings("ignore:.*deprecated.*:DeprecationWarning")
|
|
885
|
+
def test_default_client_creation(self) -> None:
|
|
886
|
+
# Ensure that the client can be initialized without any exceptions
|
|
887
|
+
DefaultHttpxClient(
|
|
888
|
+
verify=True,
|
|
889
|
+
cert=None,
|
|
890
|
+
trust_env=True,
|
|
891
|
+
http1=True,
|
|
892
|
+
http2=False,
|
|
893
|
+
limits=httpx.Limits(max_connections=100, max_keepalive_connections=20),
|
|
894
|
+
)
|
|
895
|
+
|
|
896
|
+
@pytest.mark.respx(base_url=base_url)
|
|
897
|
+
def test_follow_redirects(self, respx_mock: MockRouter) -> None:
|
|
898
|
+
# Test that the default follow_redirects=True allows following redirects
|
|
899
|
+
respx_mock.post("/redirect").mock(
|
|
900
|
+
return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
|
|
901
|
+
)
|
|
902
|
+
respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"}))
|
|
903
|
+
|
|
904
|
+
response = self.client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response)
|
|
905
|
+
assert response.status_code == 200
|
|
906
|
+
assert response.json() == {"status": "ok"}
|
|
907
|
+
|
|
908
|
+
@pytest.mark.respx(base_url=base_url)
|
|
909
|
+
def test_follow_redirects_disabled(self, respx_mock: MockRouter) -> None:
|
|
910
|
+
# Test that follow_redirects=False prevents following redirects
|
|
911
|
+
respx_mock.post("/redirect").mock(
|
|
912
|
+
return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
|
|
913
|
+
)
|
|
914
|
+
|
|
915
|
+
with pytest.raises(APIStatusError) as exc_info:
|
|
916
|
+
self.client.post(
|
|
917
|
+
"/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response
|
|
918
|
+
)
|
|
919
|
+
|
|
920
|
+
assert exc_info.value.response.status_code == 302
|
|
921
|
+
assert exc_info.value.response.headers["Location"] == f"{base_url}/redirected"
|
|
922
|
+
|
|
872
923
|
|
|
873
924
|
class TestAsyncRaccoonAI:
|
|
874
925
|
client = AsyncRaccoonAI(base_url=base_url, secret_key=secret_key, _strict_response_validation=True)
|
|
@@ -1733,3 +1784,52 @@ class TestAsyncRaccoonAI:
|
|
|
1733
1784
|
raise AssertionError("calling get_platform using asyncify resulted in a hung process")
|
|
1734
1785
|
|
|
1735
1786
|
time.sleep(0.1)
|
|
1787
|
+
|
|
1788
|
+
async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
|
|
1789
|
+
# Test that the proxy environment variables are set correctly
|
|
1790
|
+
monkeypatch.setenv("HTTPS_PROXY", "https://example.org")
|
|
1791
|
+
|
|
1792
|
+
client = DefaultAsyncHttpxClient()
|
|
1793
|
+
|
|
1794
|
+
mounts = tuple(client._mounts.items())
|
|
1795
|
+
assert len(mounts) == 1
|
|
1796
|
+
assert mounts[0][0].pattern == "https://"
|
|
1797
|
+
|
|
1798
|
+
@pytest.mark.filterwarnings("ignore:.*deprecated.*:DeprecationWarning")
|
|
1799
|
+
async def test_default_client_creation(self) -> None:
|
|
1800
|
+
# Ensure that the client can be initialized without any exceptions
|
|
1801
|
+
DefaultAsyncHttpxClient(
|
|
1802
|
+
verify=True,
|
|
1803
|
+
cert=None,
|
|
1804
|
+
trust_env=True,
|
|
1805
|
+
http1=True,
|
|
1806
|
+
http2=False,
|
|
1807
|
+
limits=httpx.Limits(max_connections=100, max_keepalive_connections=20),
|
|
1808
|
+
)
|
|
1809
|
+
|
|
1810
|
+
@pytest.mark.respx(base_url=base_url)
|
|
1811
|
+
async def test_follow_redirects(self, respx_mock: MockRouter) -> None:
|
|
1812
|
+
# Test that the default follow_redirects=True allows following redirects
|
|
1813
|
+
respx_mock.post("/redirect").mock(
|
|
1814
|
+
return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
|
|
1815
|
+
)
|
|
1816
|
+
respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"}))
|
|
1817
|
+
|
|
1818
|
+
response = await self.client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response)
|
|
1819
|
+
assert response.status_code == 200
|
|
1820
|
+
assert response.json() == {"status": "ok"}
|
|
1821
|
+
|
|
1822
|
+
@pytest.mark.respx(base_url=base_url)
|
|
1823
|
+
async def test_follow_redirects_disabled(self, respx_mock: MockRouter) -> None:
|
|
1824
|
+
# Test that follow_redirects=False prevents following redirects
|
|
1825
|
+
respx_mock.post("/redirect").mock(
|
|
1826
|
+
return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
|
|
1827
|
+
)
|
|
1828
|
+
|
|
1829
|
+
with pytest.raises(APIStatusError) as exc_info:
|
|
1830
|
+
await self.client.post(
|
|
1831
|
+
"/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response
|
|
1832
|
+
)
|
|
1833
|
+
|
|
1834
|
+
assert exc_info.value.response.status_code == 302
|
|
1835
|
+
assert exc_info.value.response.headers["Location"] == f"{base_url}/redirected"
|
|
@@ -21,3 +21,14 @@ def test_recursive_proxy() -> None:
|
|
|
21
21
|
assert dir(proxy) == []
|
|
22
22
|
assert type(proxy).__name__ == "RecursiveLazyProxy"
|
|
23
23
|
assert type(operator.attrgetter("name.foo.bar.baz")(proxy)).__name__ == "RecursiveLazyProxy"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def test_isinstance_does_not_error() -> None:
|
|
27
|
+
class AlwaysErrorProxy(LazyProxy[Any]):
|
|
28
|
+
@override
|
|
29
|
+
def __load__(self) -> Any:
|
|
30
|
+
raise RuntimeError("Mocking missing dependency")
|
|
31
|
+
|
|
32
|
+
proxy = AlwaysErrorProxy()
|
|
33
|
+
assert not isinstance(proxy, dict)
|
|
34
|
+
assert isinstance(proxy, LazyProxy)
|
|
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
|
{raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/extension_all_response.py
RENAMED
|
File without changes
|
{raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/extension_get_response.py
RENAMED
|
File without changes
|
{raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/extension_upload_params.py
RENAMED
|
File without changes
|
{raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/extension_upload_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_create_params.py
RENAMED
|
File without changes
|
{raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_create_response.py
RENAMED
|
File without changes
|
{raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_logs_response.py
RENAMED
|
File without changes
|
{raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_media_response.py
RENAMED
|
File without changes
|
{raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_status_response.py
RENAMED
|
File without changes
|
{raccoonai-0.1.0a17 → raccoonai-0.1.0a18}/src/raccoonai/types/fleet/session_terminate_response.py
RENAMED
|
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
|